Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
- To: MLUG Members <EMAIL:PROTECTED>
- Subject: Re: [MLUG] run a single command across multiple servers from one shell?
- From: Rick <EMAIL:PROTECTED>
- Date: Thu, 20 Jul 2006 08:03:50 -0500
- Delivery-date: Thu, 20 Jul 2006 07:05:05 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=LiIRuo74GgrMP/jYQI9XlqK5WP4S5b+VtTJjirr4xhin+6SeWEKy4mEZv6F3A8R/d8E6qKtC7SeyStQ731fVdlSVdFEIFq9H3to5iN/R/9xo5IjMaCdsrUj0G3A9Mfu0czXa8u1plELbCiB74Me/2kwkAfqETQ7Uyf/Cao01dZw=
- Envelope-to: EMAIL:PROTECTED
- In-reply-to: <EMAIL:PROTECTED>
- References: <EMAIL:PROTECTED> <EMAIL:PROTECTED> <EMAIL:PROTECTED>
- Reply-to: MLUG Members <EMAIL:PROTECTED>
- Sender: EMAIL:PROTECTED
- User-agent: Thunderbird 1.5.0.2 (X11/20060524)
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