SAS Procedures

Help using Base SAS procedures
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 8 replies
  • 3949 views
  • 0 likes
  • 3 in conversation