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!

Invoking another scipt on another server

Status
Not open for further replies.

byuen

Programmer
May 14, 2003
6
US
Hi, imt rying to invoke another script on another server, and i am approaching it this way:

telnet xx.xxx.xxx.xxx username password
run_script.ksh

does anyone know how to do this?
I want to write a script that telnets into another machine with username adn password, and then run a script that is on that machine.

thank you,
Brian
 
Try using [tt]rsh[/tt]. It's not a telnet, but it does run a script on another machine. See the man page for [tt]rsh[/tt]. You would run it something like...
Code:
   rsh somehost -l someuser run_script.ksh
On the other system, you would need to set up either a [tt]hosts.equiv[/tt] file or a [tt].rhosts[/tt] file to allow you in. The man page should show how to do that.

One nice thing about using this approach is that you don't have to hard code a password in your script.

Hope this helps.

 
On some *nix rsh is called remsh or rcmd.

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top