BookmarkSubscribeRSS Feed
Cultivator
Calcite | Level 5

Hi, 

Please help! Thank you in advance.

I was trying to connect SFTP using below code, and always get a error 'CONNECTION REFUSED'

I am not sure is that because: ' Note: Password validation is not supported for the SFTP access method.'

or  there is something wrong with my code ? 

if i have to connect the SFTP using SAS, is there a way can avoid this error ?

 

PS: I have validated the host info, there is no problem.

 

Thank you so much!

 

filename myfile 
SFTP "MyOutput_file.csv"    
cd='/output/myfolder' 
debug 
host="ftp.s20.vendor.com" 
user="100008686"
recfm=v;
3 REPLIES 3
ballardw
Super User

The "connection refused" message is coming from the site you connect to. Apparently you are not providing the information you need for the site. If you log onto that site manually do you provide a password?

 

The sftp filename does not directly support a password but perhaps you can supply one using OPTIONs='option string' on the filename. 'Option string' might look like 'pass=yourpassword' or similar.

 

Or perhaps use FILENAME FTP instead where pass='password' is a standard option or PROMPT to be prompted to enter a password.

Cultivator
Calcite | Level 5
Thank you, Ballardw. I tried both way you mentioned.
1) optionsx =' -pw "xxxxxxxxxxxxxxxxxxxxxxx" '
2) Using Filename FTP
however, either way didn't work.
ballardw
Super User

Can you connect with either a command line or other sftp or ftp client (like a browser perhaps)?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1052 views
  • 0 likes
  • 2 in conversation