1850770 Members
3625 Online
104055 Solutions
New Discussion

Rsh help

 
Gordon_3
Regular Advisor

Rsh help

Hi all,

Has written a simple shell script to rsh to a machine and that cmd will expect a user input, however, no matter I tried "rsh -n" or simply "rsh" , somehow seems the script keep answer /dev/null to the input ( say it only accept Yes / No ), so the script continue to loop, requesting valid input and can't stop unless a kill. Any hints on this situation.

Don
Gordon
3 REPLIES 3
Rajesh SB
Esteemed Contributor

Re: Rsh help

Hi,

By defining trap in the script like
# trap "exit " 15. You can come out from the script using ctl+c, instead of killing explicitly.

Regards,
Rajesh
Steven E. Protter
Exalted Contributor

Re: Rsh help

I think the script on the target server needs an environment. Perhaps the TERM variable or some stty commands so the read command will work properly.

Perhaps you could upload your current script.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bob_Vance
Esteemed Contributor

Re: Rsh help

What OS?
What version?
Show us your script.
Exactly the command that you are using to execute it.

'rsh' is restricted shell on HPUX.

This is an HPUX forum.
Are you doing 'rsh' on Linux?
Or are you really doing 'remsh' on HPUX.

A simple script reading input worked fine for me on HPUX 11.11 using 'remsh'.


bv
"The lyf so short, the craft so long to lerne." - Chaucer