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
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 |
- How To Install Netflix In Ubuntu : Hi unixmen readers! How are you? In this article we will teach you how to install the desktop vers...2 comments |
- How To Configure Linux Clients To Authenticate Using OpenLDAP : This is the continuation of our previous tutorial. In our previous tutorial we learned how to instal...2 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 |
- Setup IT And Asset Management System With GLPI On Debian/Ubuntu : GLPI is the Information Resource-Manager with an additional Administration Interface. You can use it...0 comments |
- Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...0 comments |
- Install FrostWire 5.6.9 In Elementary OS ‘Luna’/ Ubuntu / Linux Mint
- Setup IT And Asset Management System With GLPI On Debian/Ubuntu
- How To Configure Linux Clients To Authenticate Using OpenLDAP
- How To Install Netflix In Ubuntu
- cowsay And fortune Combined Together
- How To Show Username On Panel In Ubuntu 13.04/13.10
- Setup DNS Server On openSUSE 13.1
- TeamViewer 9 Final Has Been Released!
- Twelve Vulnerabilities Have Been Fixed In Ubuntu 12.04, Time To Update
- OpenLDAP Installation and Configuration in Ubuntu 12.10/13.04/13.10 And Debian 6/7
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .