BookmarkSubscribeRSS Feed
stuart_snap
Fluorite | Level 6

Hello fellow coders!

I am getting a very basic error trying to read a text file from a FTP server.  The error says that "The connection has timed out..", which I believe basically means it is not connecting at all.  Below is the code I am using to login (with fake login credentials).  The connection works fine using any number of FTP clients. I have tried it in EG and BASE... same error in both.  Any suggestions?

filename myfile ftp 'TEST.txt' cd='/Incoming folder/'

                            user='me1234 pass='passpass' host='sftp.randomcomp.com';

I assume I am missing something simple... but I have tried various things. 

3 REPLIES 3
LinusH
Tourmaline | Level 20

Your remote host is called sftp. Is it by any chance requiring a sftp connection? Perhaps try the sftp access method instead?

Data never sleeps
stuart_snap
Fluorite | Level 6

Well, I feel dumb.  Thanks for pointing that out, Linus!

It seems like the SFTP process doesn't have a password option.  Are you familiar with the SFTP process?  I think I am missing a step.

Tom
Super User Tom
Super User

Get it to work from command line on your SAS host system first.  What I have found is that if I save the key into a file then I use the IdentityFile option.

filename myfile ftp 'TEST.txt' cd='/Incoming folder/'

                            user='me1234 pass='passpass' host='sftp.randomcomp.com'

  options='-o IdentityFile=~/.ssh/me1234.txt'

;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1331 views
  • 3 likes
  • 3 in conversation