How to work on multiple servers together in a single time ?

Today we will introduce you to a very useful tip to perform server operations on multiple servers together.

For this we will use a a application called csshx shared by Gavin Brock.

You can visit on below URL to download this master piece of code or google csshx i.e. Cluster SSH:


Using Cluster SSH

To use cluster ssh to execute a command on multiple servers together, we need to create a hostfile which contains the list of all hosts on which we want to execute the commands together.

The beauty of cluster SSH is that we can also execute the command individually when we want and can also execute a command on all hosts together.

To use this, run csshX script with list of hosts’ file.

user@ngelinux$  cat hostfile

#### Now lets open a master window to execute our command on all above servers.
#### Ctrl + W —> Shortkey to close the windows

user@ngelinux$ ./csshX -l saket --hosts hostfile

After running above csshx script, it will open multiple windows and arrange it according to screen ratio.

And also open a master terminal in screen bottom where we can type and run commands on all servers in one go. csshx example
0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments