Sunday, November 29, 2009


Many times you have to perform the same task on many servers. Clusterssh enables you to send the commands just once and get things done in each of those servers.

In Debian, you can install it this way :
apt-get install clusterssh
(for windows, you can get a similar software from this link).
Then, for instance, to connect to server1, server2 and server3, just do:
cssh -l root server1 server2 server3 &
It will open 3 xterm windows, one for each server. You will get too a little console to type your command. If you just write some text in this console, it will be written on all the other windows.

Here is an photo of cssh connecting to 2 servers. The little console to type commands is on the right :

With this tool, I have been able to manage as far as 12 servers at the same time. The only limit of the number of server you can manage is the size of your screen.

What I do like with clusterssh, is that you don't need to set ssh-keys on your server like with pssh. What is more, it is easy to make a change on just one server by focusing on that server window instead of the little command console.

The only drawback is that if you make a mistake, you make it on all servers (with great power comes great responsibility...). Despite of that, I believe it is a great tool to increase productivity.

No comments:

Post a Comment