This article provides you useful information to control multiple machines using single terminal using cluster ssh
What is CLUSTER SSH?
With ClusterSSH it is possible to make a SSH connection to multiple servers or machines to perform tasks from one single command window, without any scripting. The ‘cssh’ command lets you connect to any server specified as a command line argument, or to groups of servers (or cluster nodes) defined in a configuration file.
How to Install?
I am providing the steps to install cluster ssh in Ubuntu/Linux. Its very simple to install. No configuration required after installation in Ubuntu.
sudo apt-get install clusterssh
Now you are ready with clusterssh.
For other Linux Distributions
- ClusterSSH RPM for openSUSE 10.2/10.3 and SLE10 are available through the openSUSE Build-service: http://download.opensuse.org/repositories/home:/martijn/
- The ClusterSSH sourcecode can be downloaded from: http://sourceforge.net/project/showfiles.php?group_id=89139
cssh usage
I will explain you with an example using cssh. Let’s say I want to install php on 5 machines simultaneosly. Here is the command
cssh host1 host2 host3 host4 host5

The ‘cssh’ command opens a terminal window to every host. Commands given in to the cssh-console are executed on every connected host. When you start typing in the cssh-console you’ll see that the same command also show up on the command line of the connected systems.
Now type this command as we are about to install php on all 5 machines
sudo apt-get install php5
- If you are typing above command, you can see all the 5 terminals connected to above hosts will be shown up simultaneosly
- So if you want to exclude certain hosts temporarily from specific command, you can do this with a single mouseclick. Also, hosts can be added on the fly and open terminal windows can automatically be rearranged.
I have provided you a simple example of installing a package in multiple hosts. Now you can do any thing in terminal to control/configure any number of hosts. The number of hosts is not limited, you can give any number of hosts. I have tested 50 hosts at a time and worked well
Related posts:
- Control Multiple PCs With One Keyboard/Mouse
- Renaming multiple files simultaneously
- Download Picasa 3.0 for ubuntu
- Running Multiple Instances of Google Talk
- Run multiple instances of gtalk
- Ubuntu intrepid ibex Desktop look and wallpaper
- How to use crontab in Ubuntu/Linux
- How to block websites in Ubuntu Linux
- Configure gnome desktop environment using gconftool in ubuntu linux
- Linux Keylogger in Ubuntu

