[lug] distributed shell or ssh ?
PC Drew
drewpc at colorado.edu
Tue Sep 5 17:31:50 MDT 2000
Here is my solution. It ain't pretty, but it works:
-- BEGIN FILE doforall.sh --
#!/bin/sh
# to be used like: doforall.sh "sudo userdel myuser; sudo rm -rf /export/home/myuser"
ssh web1 $1
ssh web2 $1
ssh bv1 $1
ssh uat $1
ssh reports $1
-- END FILE doforall.sh --
Now, if you've got RSA keys already setup without passwords, then you don't need to enter anything. If not,
then you should try writing it in Expect.
--
PC Drew
"To understand recursion, we must first understand recursion."
On Tue, 5 Sep 2000, Charles Morrison wrote:
> Greetings,
>
> I was wondering if anyone knows of an easy way to send the same command to
> multiple servers at once? Then to make it more interesting, with encryption. I
> know it's possible to script a little program to do this, but I'm thinking a
> single, command line program that you could feed a list of IPs (in a text file
> maybe) and have it run the particular command on all of them. If it already
> exists I don't want to reinvent it.
>
> Chuck
>
> --
>
> Chuck Morrison ~~~ /\ /\^/\ cmorrison at valinux.com
> VA Linux Systems /\ \/\ / /\
> Platteville, CO _/\_\_\_\/_/_/\_
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>
More information about the LUG
mailing list