ClusterSSH: Manage Multiple SSH Sessions on Linux
ClusterSSH is a Cluster administration tool via SSH. It is used to control number of xterm windows via a single graphical console window to allow commands to be interactively run on multiple servers over an SSH connection. If you’re are a Linux administrator managing hundreds of machines, you may have chances to enter same command on many servers. To do that, you have to login to each server and should enter the command on each server. It is such a time consuming process. Using ClusterSSH, the commands typed in the administration console window will replicate to all servers. In simple words it is an excellent tool for making the same change on multiple servers at the same time.
sk@sk:~$ sudo apt-get install clusterssh
It will not be found in official repositories. So add EPEL repository and install clusterssh.
To add EPEL repository, enter the following command:
[root@server ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Now install ClusterSSH:
[root@server ~]# yum install clusterssh -y
Configuration is simple and straight forward. Create a ClusterSSH config file and define the clusters. For instance, I am managing two servers Ubuntu 13.04 server and CentOS 6 server from my Ubuntu 13.04 desktop. Here I use my cluster name as testcluster and ip address of both servers are 192.168.1.200 and 192.168.1.201 respectively.
First create a cluster config file as shown below:
sk@sk:~$ sudo nano /etc/clusters clusters = testcluster testcluster = 192.168.1.200 192.168.1.201
Save and exit the file. Here, testcluster is my cluster name. 192.168.1.200 is my CentOS 6 server IP address and 192.168.1.201 is my Ubuntu 13.04 server IP address. You can use hostnames instead.
Open up your terminal and run the following command. You must allow the port 22 through Firewall/Router to access the servers from any remote machines:
sk@sk:~$ sudo cssh -l root testcluster
The terminal windows of all servers will be automatically opened as shown below.
Enter the Root password on both servers SSH sessions. Now you will see that two servers are logged-in through SSH.
Alternatively you can launch it using individual hostname or IP address instead of cluster name:
sk@sk:~$ sudo cssh -l root 192.168.1.200 192.168.1.201
The small window called CSSH(2) is the administration console window of ClusterSSH. The commands typed in the administration console will reflect on both servers.
For example, I type hostname command and hit enter on the ClusterSSH administration console. As you seen in the below screen shot, the command hostname is performed automatically on both servers at the same time and displays the result.
Kind note: If you type any wrong commands or inappropriate commands in CSSH admin console, it will perform on all servers simultaneously and will lead you into trouble. Double check the commands before hit enter. Enjoy!
Like us on Facebook
We need your assistance to stay live
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04 : Power Commands, power management application created by the Atareao team , this app helps users to...0 comments |
- Install Uget Download Manager In Ubuntu, Fedora, Debian : uGet is a very light-weight and powerful open source download manager. On March 4th, 2014 Uget Do...0 comments |
- Install Crashplan backup tool in Linux : CashPlan is an automated backup solution that either uses the CrashPlan Central server or any other ...0 comments |
- Download Elementary OS 'Luna' Official Wallpapers : Hi Guys, Am a great lover of Elementary OS, so I like to move almost everywhere with some its beaut...0 comments |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- Fedora 21 Scheduled For Release In October
- Install Uget Download Manager In Ubuntu, Fedora, Debian
- Download Elementary OS ‘Luna’ Official Wallpapers
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04
- 5 Android Apps that’s Going to Make Running Your Business Less Stressful
- Puppet agent Install Using Script
- Install Corosync and Pacemaker On CentOS 6.5
- Install Fail2Ban On Ubuntu Server 13.04/13.10
- How To Install Google Chrome in Fedora 20, 19, 18
- How to surf using Tor Browser Bundle
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .