- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi folks,
I have been following the SAS documentation on this link , especially example 6 to the below code:
filename output sftp lsa
host="sftphost"
optionsx='pw "somepw"' user="userid" debug;
data temp;
infile output truncover;
input a $200.;;
run;
Basically, I am just trying to connect to the server and list all the files under the working directory, but I got the error message saying "ERROR: Directory or file ls -a w "somepw" userid@sftphost doesn't exist.". So, what am I missing here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Did you see these notes?
- Note: Password validation is not supported for the SFTP access method.
- Note: Public key authentication using an SSH agent is the recommended way to connect to a remote SSHD server.
- Note: If you have trouble running the SFTP access method, try to manually validate SFTP client access to an OpenSSH SSHD server without involving the SAS system. Manually validating SFTP client access without involving the SAS system ensures that your SSH or SSHD configuration and key authentication is setup correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I don't see any of those notes. I did validate the username and password using WinSCP client.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Those NOTEs are part of the documentation of FILENAME Statement: SFTP Access Method
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You must set up passwordless authentication with your local (on the SAS server) sftp client first, using a public/private keypair.
Since SAS uses an external sftp client which does not accept a password on the commandline (for security reasons, commandlines appear in the public process list), you cannot specify a password at all.
FILENAME FTP allows this because the whole FTP code is integrated within SAS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The -pw (note the dash) option in example 6 specifies a pass phrase needed to open the .ppk file containing the private key. It is an option internal to WinSCP, and has nothing to do with an sftp password used to log on to a server.