From ubuntugeek
If you have multiple servers with similar or identical configurations (such as nodes in a cluster), it’s often difficult to make sure the contents and configuration of those servers are identical. It’s even more difficult when you need to make configuration modifications from the command line, knowing you’ll have to execute the exact same command on a large number of systems .
In this tutorial we will see some tools to execute one command on multiple remote servers using ssh.First you need to make sure you have ssh installed in your machine or you can install using the following command
sudo aptitude install ssh
If you have multiple servers with similar or identical
configurations (such as nodes in a cluster), it’s often difficult to
make sure the contents and configuration of those servers are
identical. It’s even more difficult when you need to make configuration
modifications from the command line, knowing you’ll have to execute the
exact same command on a large number of systems .In this tutorial we will see some tools
to execute one command on multiple remote servers using ssh.First you
need to make sure you have ssh installed in your machine or you can
install using the following commandsudo aptitude install ssh
Now we are going to see the following tools which does the required job we are looking for
1) Pssh
2) cluster ssh
3) Multixterm
1) Pssh
pssh provides a number of commands for executing against a group of
computers, using SSH. It’s most useful for operating on clusters of
homogenously-configured hosts.The package contains:
- Parallel ssh (parallel-ssh, upstream calls it pssh), executes commands on multiple hosts in parallel
- Parallel scp (parallel-scp, upstream calls it pscp), copies files to multiple remote hosts in parallel
- Parallel rsync (parallel-rsync, upstream calls it prsync), efficiently copies files to multiple hosts in parallel
- Parallel nuke (parallel-nuke, upstream calls it pnuke), kills processes on multiple remote hosts in parallel
- Parallel slurp (parallel-slurp, upstream calls it pslurp), copies
files from multiple remote hosts to a central host in parallelThese tools are good for controlling large collections of nodes, where faster alternatives




