DATA Step, Macro, Functions and more

[ERROR: the _prompt_ value for userid or password option is only valid if a terminal is attached]

Accepted Solution Solved
Reply
Contributor
Posts: 38
Accepted Solution

[ERROR: the _prompt_ value for userid or password option is only valid if a terminal is attached]

Hello, everyone. I am connecting to a server and use this unix server to connect to another unix server.

 

code as below:

 

%let sshhost=localhost 7551;
options set=TCPTN3270 0;
filename rlink 'C:\SAS_TUNNEL\tcpunix.scr';
signon sshhost;

libname rwork slibref=work server=sshhost;

/* remote signon SAS DI Studio in a from BASE SAS in b*/

rsubmit sshhost;
  %let dis=(server name of a) (portNo of a);
  options comamid=tcp remote=dis; 
  signon user=_prompt_ password=_prompt_;
endrsubmit;

However, error message is occured.

2017-08-03_122930.jpg

 

Any suggestion?


Accepted Solutions
Solution
2 weeks ago
Super User
Posts: 3,102

Re: [ERROR: the _prompt_ value for userid or password option is only valid if a terminal is attached

[ Edited ]

Trusted connections on Unix can be provided by using IWA on Unix which would involve using Kerberos. If you are not an expert in this technology then it would pay to get expert help on this as it is tricky and time consuming to set up. Check this link for more details:

 

http://support.sas.com/documentation/installcenter/en/ikfdtnunxcg/66380/PDF/default/config.pdf

 

Maybe a more low-tech solution might be possible, perhaps by prompting for the user name and password on your PC via your SIGNON script and then passing these through to your first Unix server as macro variables so they can be added to your second SIGNON.  

View solution in original post


All Replies
Super User
Posts: 3,102

Re: [ERROR: the _prompt_ value for userid or password option is only valid if a terminal is attached

[ Edited ]

Using _prompt_ in an RSUBMIT block isn't going to work as the remote session is trying to pop up a prompt window for you to enter the user name and password but can't because there is no terminal session to display it on.

 

You will need to code the actual user name and password in the remote session SIGNON statement for this to work.

Contributor
Posts: 38

Re: [ERROR: the _prompt_ value for userid or password option is only valid if a terminal is attached

Is there any other methods to do it without hard code?

Also, how to make it in trusted connection, so that no need enter username or password.
Solution
2 weeks ago
Super User
Posts: 3,102

Re: [ERROR: the _prompt_ value for userid or password option is only valid if a terminal is attached

[ Edited ]

Trusted connections on Unix can be provided by using IWA on Unix which would involve using Kerberos. If you are not an expert in this technology then it would pay to get expert help on this as it is tricky and time consuming to set up. Check this link for more details:

 

http://support.sas.com/documentation/installcenter/en/ikfdtnunxcg/66380/PDF/default/config.pdf

 

Maybe a more low-tech solution might be possible, perhaps by prompting for the user name and password on your PC via your SIGNON script and then passing these through to your first Unix server as macro variables so they can be added to your second SIGNON.  

Contributor
Posts: 38

Re: [ERROR: the _prompt_ value for userid or password option is only valid if a terminal is attached

or how to prompt for user to input
as I have tried in enterprise guide: properties --> prompt
however, when i export to run in unix, nothing prompt
Contributor
Posts: 38

Re: [ERROR: the _prompt_ value for userid or password option is only valid if a terminal is attached

@SASKiwi I cannot find any sas code related keyword "sas code prompt for user input" in google
Super User
Posts: 3,102

Re: [ERROR: the _prompt_ value for userid or password option is only valid if a terminal is attached

Check out the WINDOW or %WINDOW statements for user input (I'm assuming you have Base SAS on your PC):

 

http://support.sas.com/documentation/cdl/en/mcrolref/69726/HTML/default/viewer.htm#n0ojc9rtfrzvbdn16...

 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 114 views
  • 0 likes
  • 2 in conversation