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

I am getting the following error message when I try to sftp from SAS EG:

 

SAS Host key verification failed. Couldn't read packet: Connection reset by peer

 

This is when I execute the sftp command using the x command e.g.

x "sftp my_user@mytest.vvv.sss.xxxxxx.com.aa"; XCMD is enabled as I can issue other x commands successfully.

 

This is even though I am logged on in EG as the same user that has been set up with the public and private keys on the Unix server and my code is submitted to run on that server.

 

If I log on to the unix server directly with the same account id as in EG using Putty, and issue the same command, sftp my_user@mytest.vvv.sss.xxxxxx.com.aa it works, and connects successfully to the remote sftp server.

 

Any suggestions welcome.

1 ACCEPTED SOLUTION

Accepted Solutions
k1w1
Calcite | Level 5

ok the problem is solved. It turned out that because we are operating in a grid environment, the keys need to be verified on all 4 grid hosts and a known_hosts file created on each. Once this was done and a few underlying permission changed made by the unix admin guy the code worked like a dream and all was good in the world. Thanks to all those who tried to help with this tricky issue.

View solution in original post

3 REPLIES 3
Kurt_Bremser
Super User

Just a hunch: immediately before you try the sftp, do

x 'cd $HOME';

Also, retrieve all responses to the sftp command:

filename oscmd pipe 'sftp my_user@mytest.vvv.sss.xxxxxx.com.aa 2>&1';
data _null_;
infile oscmd;
input;
put _infile_;
run;
k1w1
Calcite | Level 5

ok the problem is solved. It turned out that because we are operating in a grid environment, the keys need to be verified on all 4 grid hosts and a known_hosts file created on each. Once this was done and a few underlying permission changed made by the unix admin guy the code worked like a dream and all was good in the world. Thanks to all those who tried to help with this tricky issue.

Kurt_Bremser
Super User

"Working in a grid" is always important information, as it often explains "intermittent" failures caused by different configurations on the individual nodes.

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!

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.

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
  • 2508 views
  • 0 likes
  • 2 in conversation