MLUG: Re: [MLUG] run a single command across multiple servers from one shell?
Re: [MLUG] run a single command across multiple servers from one shell?
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I just use ssh in a loop:

#!/bin/bash
for i in <ip addresses>
 do
  echo ">>>>> Server: $i <<<<< Executing: $@ >>>>>"
  ssh -p 2200 <user>@$i "$@"
 done

# replace "ssh" with "ssh -p 2200" for connection to sshd_secure

sshd_secure is a second SSH daemon (not available to the outside) running on a different port and managed by init

Rick

Ian wrote:
'scmd' also works quite well for executing the same command on multiple servers.

On 7/12/06, *Michael* <EMAIL:PROTECTED <mailto:EMAIL:PROTECTED>> wrote:

    Sounds like disaster waiting to happen. Instead of accidentally 'rm -Rf
    /' one machine you can take out 100 at a time. Much better to use a
    pre-programed interface that can run specific scripts across multiple
    machines.
     > i read about this somewhere a while back, it's a linux command or
     > utility. but i can't remember what it is.
     >
     > say i have 10 red hat servers and i want to run df -h on all 10
     > servers from a single term session on my laptop. any ideas?

_______________________________________________

--
Millions of dollars from various governments, business and NGOs spent on developing hardware, protocols, software and you people use it to pretend to fart at each other...
----


_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members