• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ClusterSSH(cssh) – Manage Multiple SSH Sessions on Linux

by admin

ClusterSSH(cssh) is a cluster administration tool, it is used to make the same change on multiple Linux servers at the same time. ClusterSSH(cssh) controls a number of xterm windows via a single graphical console window to allow commands to be interactively run on multiple Linux servers over an ssh or rsh connection.

Cssh command opens an administration console and an xterm to all specified hosts. Any text typed into the administration console is replicated to all windows. All windows may also be typed into directly.

Installation of ClusterSSH on Ubuntu

Use the apt-get command to install required package:

# sudo apt-get install clusterssh

Installation of ClusterSSH on CentOS/RHEL/Fedora

To install ClusterSSH on CentOS/RHEL/Fedora, first set up EPEL repository, and then run the below Command:

# yum install clusterssh

After installation, define the cluster of hosts that we want to run commands on. To do this, create a system-wide ClusterSSH configuration file as follows.

# sudo vi /etc/clusters

ClusterSSH(cssh) – Manage Multiple SSH Sessions on Linux

If we want a user-specific ClusterSSH configuration, simply use ~/.csshrc instead of /etc/clusters. In the above example, I define two clusters: nsit_cluster1, nsit_cluster2 along with hosts.

Example 1: To launch ClusterSSH, run cssh command as follows.

# cssh -l root nsit_cluster1

In the above command, ‘root’ is the login ID for all the hosts in the cluster, and ‘nsit_cluster1’ is the cluster name.

Clusterssh cssh

Example 2: Individual hostname instead of the cluster name.

# cssh -l root mail1.nsitmail.com mail2.nsitmail.com mail3.nsitmail.com

In the Above command, just replace the hostname according to your environment.

Filed Under: Linux, Ubuntu

Some more articles you might also be interested in …

  1. agate – A simple server for the Gemini network protocol (Command Examples)
  2. adig: command not found
  3. iw: command not found
  4. How to Install GUI On CentOS/RHEL 8
  5. UbuntuDDE new upcoming Linux distribution
  6. How to Run DNS and FTP services in a chroot Jail
  7. Failed to Download Metadata for Repo ‘repo_name’
  8. How to check rpm package integrity in Linux
  9. ntpdate Command Examples in Linux
  10. Shell Script to print pyramid of Stars

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright