A common problem when you deal with a pool of servers (clusters or server farms, you name it) is to execute the same command line on each server. It is usual to solve this with a “for” construct such as :
for i in server1 server2 ; do ssh $i "uname -a"; done
For a simple use, you first need to setup a machines.list file (either in /etc or /etc/dsh) which is simply a file with one hostname by line.
dsh will use either rsh, remsh or SSH to remotely execute the commands. Of course SSH is highly recommended as it is much more secure than the others.
This means that you will have to deploy your SSH public keys beforehand, so that SSH can login on the remote host without interactively typing a password.
Then running a command on multiple hosts is just a matter of something like :
dsh "uname -a"
Of course you can define groups of hosts, and use the “-c” option switch to launch the commands in parallel instead of one after the next.
Nice tool if you have a cluster (or a pool of servers) to administrate !