Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

automating login with rsh

Status
Not open for further replies.

caffeinerusher

Programmer
Mar 7, 2001
31
US
Hi --

I'm writing a script and in it I need to connect to a remote host and then run a number of commands. The problem is that I cannot connect to the remote host without entering my password. I don't mind doing that, but when the password prompt comes up (prompted by the rsh command) and I login, the script stops running. It will only continue to run after I exit the remote host. Any suggestions??

--Caffeinerusher
 
Hi,
You can use remsh systemname -l username (the -l provides the login name to use). The remote system need to have the appropriate .rhost file set up in the home directory of the login name. Hope this helps.
 
Try using Expect, it's a great language and easy to learn. You can automate logging in, and many other interactive tasks using Expect. d3funct
zimmer.jon@cfwy.com
The software required `Windows 95 or better', so I installed Linux.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top