BookmarkSubscribeRSS Feed
tejeshwar
Calcite | Level 5
Hi,

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 domain_name@xyz.com')

Thanks in advance

Tej
5 REPLIES 5
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
A search of the SAS support http://support.sas.com/ website revealed this SAS DOC item which may be of use:

FILENAME Statement, SFTP Access Method
http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a003041481.htm

Scott Barry
SBBWorks, Inc.
tejeshwar
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
Tej
DanielSantos
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).

Check:
http://support.sas.com/documentation/cdl/en/hostunx/61879/HTML/default/a002460936.htm

And:
http://support.sas.com/documentation/cdl/en/hostunx/61879/HTML/default/autoexec.htm

Cheers from Portugal.

Daniel Santos @ www.cgd.pt
tejeshwar
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:\login.sas"

Thanks again,
Tej
ColmSmyth
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

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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
  • 5 replies
  • 5154 views
  • 0 likes
  • 4 in conversation