Hi to all,
I need to use the SFTP protocol with SAS.
the sftp works with linux command by mobaxterm terminal.
But when I use the SFTP by libname of SAS, it doesn't work, because it doesn't find the file or directory which I have to download in my host.
filename tmep sftp '' host="" user="" optionsx="" lsa lsfile='' ; data aaa_; length a $ 32767; infile tmep truncover; input a ; run;
It say the directory or file doesn't exist.
what can I do?
is there some option to help me which path define the filename?
The system is linux that call sftp in another machine of linux.
You need to setup authentication in sftp with a private/public key pair. Only when you can use sftp without having to enter a password, you can use it from SAS.
Do you have password-less authentication in sftp set up?
Meaning that
sftp user@host
gets you connected automatically without a further prompt?
Yes, there is the password with the terminal Mobaxterm. But in the libname statement, when i put the pass option i get the error of invalid filename. Meanwhile In the optionsx we use the public key.
is there a way to set-up the password in sftp filename?
You need to setup authentication in sftp with a private/public key pair. Only when you can use sftp without having to enter a password, you can use it from SAS.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.