BookmarkSubscribeRSS Feed
nickb
Calcite | Level 5
I'm trying to send a file to a SFTP site and not having any luck. I have installed PUTTY based on some notes I found online.

Here is the code I'm using:

filename outfile sftp 'd:/temp/test.txt' host="server" user="user";

data _null_;
file outfile;
do i=1 to 10;
put i=;
end;
run;
8 REPLIES 8
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
And what's the exact error or problem symptom? Also info about SAS version, OS platform would be most helpful - even to suggest that you copy/paste the SAS log revealing the error diagnostic and your code.

Scott Barry
SBBWorks, Inc.
nickb
Calcite | Level 5
I'm running 9.2 on Windows 2003 64 bit machine. I used the document TS-800 "Configuring SSH Client Software."

ERROR: Connection refused, check key authentication and sshd server status
ERROR: Connection refused, check key authentication and sshd server status
ERROR: .
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
Patrick
Opal | Level 21
Agree with Scott.

First thing I'd do to narrow down possible issues is to manually open a sftp connection to the target server in putty. This will tell you if you can open such a connection at all with your user. It also tells you which parameters you have to pass to establish such a connection (i.e. a password).

Still in putty I would then send some test file to the destination directory to verify if the path exists and if I have write access to it.

Only if both this things work I would start investigating what could be wrong with my SAS code. Message was edited by: Patrick
nickb
Calcite | Level 5
I'm able to use PSFTP and connect to the server fine.
Patrick
Opal | Level 21
2 things to add to your filename statement which might help/give you more information:

filename .... options = "Port=.." DEBUG ;
nickb
Calcite | Level 5
I put the additional items in the code and the log outputs the same information.
nickb
Calcite | Level 5
Could it be an issue where SAS can't resolve the Private Key? Do I need to have the key in a special location for SAS?
Patrick
Opal | Level 21
I would suggest you open a track with our friends from SAS Tech Support and provide them with as much information as you have.

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
  • 8 replies
  • 2949 views
  • 0 likes
  • 3 in conversation