BookmarkSubscribeRSS Feed
Calcite | Level 5

I am running a below command to create a master tunnel to the server from inside sas. My question is that if I am using an "auto-login" facility , is there a way i can do that through sas by tweaking the below piece of code.

options noxwait noxsync;
data _null_;
rc=system('putty -ssh -L 12355:localhost:3452')

Thanks in advance

Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
A search of the SAS support website revealed this SAS DOC item which may be of use:

FILENAME Statement, SFTP Access Method

Scott Barry
SBBWorks, Inc.
Calcite | Level 5
Thanks Scott!

I was able to setup auto-login, however I am troubling you with one more question.
Is there a way I can have SAS execute a specific lines of code everytime I open up a SAS session?

I want to have SAS create that master tunnel to the server through that code eveytime it opens a session

Thank you
Barite | Level 11
Yes indeed.

The appropriate way would be to include your code into the autoexec file (same directory of your sas executable, or use -autoexec comand line to specify another location).



Cheers from Portugal.

Daniel Santos @
Calcite | Level 5
Thanks so much Daniel.

I also wanted to let you know that I was able to create a batch file and accomplish the same with contents as below.

"C:\Program Files\SAS\SAS 9.1\sas.exe" -sysin "C:\"

Thanks again,
Fluorite | Level 6
Could you please let me know how you connected to an SFTP, i tried the documentation at the paths provided and they do not work for me.

I dont seem to be able to connect as there is no password option in SAS to do it.

basically all i want to do is connect to an SFTP, i have username and password for this and IP address, then tell sas where to look and then use a command to grab a file... initially though just to connect is my issue.

Hope you can help


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!

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
  • 5 replies
  • 4 in conversation