Executing commands on remote machines (was: Re: [SLUG] SOS)

2000-10-31 Thread James Wilkinson

On Tue, 31 Oct 2000, [EMAIL PROTECTED] generated:

Thanks Colin for the suggestion. But, rsh will be a handy option if I am puttin
g
the configuration on one remote machine. But, i have a scenarion where the
remote machines may increase or decrease. I am picking up the Ip address and th
e
machine names at run time from the oracle database, and then telnetting on each
of them to do run some commands. Could you tell me any alternative in this
context ?

er, using rsh or ssh in the exact same way as you think you want to use
telnet.  just like Colin said.

Write a script to do what you want.

$ scp script newhost:script
$ ssh newhost script

will copy the script to the new host and then attempt to run it.

For the examples you gave, something like

$ ssh newhost ls

would do just what you want.

-- 
Sure, I subscribe to USENET, but I only get it for the articles.


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: Executing commands on remote machines (was: Re: [SLUG] SOS)

2000-10-31 Thread Jeffrey Borg



Everything else deleted. This idea should work!
You could also try pipeing the script into sh like this

ssh newhost /bin/sh  script

might work? but being unix it should! 

well it does work
echo "echo testin" | ssh somehost /bin/sh 

yields you guessed it.
testin

saves the copying anyway.

Jeff

 $ scp script newhost:script
 $ ssh newhost script
 
 will copy the script to the new host and then attempt to run it.
 
 For the examples you gave, something like
 
 $ ssh newhost ls
 
 would do just what you want.




-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug