BookmarkSubscribeRSS Feed
Lynn_SAS
Fluorite | Level 6

I followed the instruction here (https://go.documentation.sas.com/?docsetId=lestmtsglobal&docsetTarget=p0xln1fiwsr340n1xxf4mkmfxp6f.h...) to connect to a server at Nonstandard port. 

 

Here is my code:

FILENAME rmt sftp "datafile_today.zip"
options="-oPort=100"
host='serverIP'
user='myuserid'
wait_milliseconds=100000
cd='/'
recfm=s
debug;

 

Here is the error that I had in the Log:

NOTE: psftp: unknown option "-oPort=100" try typing "psftp -h" for help
NOTE: cd "/"
ERROR: Directory or file datafile_today.zip doesn't exist.

 

 

Updates:

After looking for possible solutions for this issue, I updated my SAS code to be as below:

 

FILENAME rmt sftp "90391660_DigitalData_20190410.zip"
options="-P = 100"
host='serverIP'
user='myuserid'
wait_milliseconds=100000
recfm=s
options="-v"
debug;

 

However, SAS can't recognize the port option. From the error message in the log, SAS was trying to connect to the server at a standard port 22. See log below:

NOTE: Looking up host "ServerIP" for SSH connectionConnecting to ServerIP port 22 We claim version:
SSH-2.0-PuTTY_Release_0.71
NOTE: Network error: Network error: Software caused connection abortFATAL ERROR: Network error: Network error: Software caused
connection abort

 

Any ideas are appreciated!

 

2 REPLIES 2
SASKiwi
PROC Star

Have you tried testing this on a command line: psftp -P=100? If it works from a command line then it will likely work in SAS.

 

Failing that SAS Tech Support might be your best bet.

Lynn_SAS
Fluorite | Level 6

Yes, it worked in the command line. 

 

I wrote a winscp script to do the work instead of doing it in SAS.

 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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