BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Rakeon
Quartz | Level 8

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
4 REPLIES 4
Kurt_Bremser
Super User

Do you have password-less authentication in sftp set up?

Meaning that

sftp user@host

gets you connected automatically without a further prompt?

Rakeon
Quartz | Level 8

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?

 

Kurt_Bremser
Super User

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.

Rakeon
Quartz | Level 8
Kurt, thanks for your advice...it help us so much for improving.
The mainly problem was that we haven't access priority in that path of SFTP. we asked to define another path for SFTP.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1954 views
  • 2 likes
  • 2 in conversation