clusterssh
TLDR
Open SSH connections to multiple hosts
SYNOPSIS
cssh [options] [hosts|clusters]
DESCRIPTION
ClusterSSH (cssh) opens multiple SSH terminal windows simultaneously, with a control window that broadcasts keystrokes to all connections. This enables running the same commands across multiple servers in parallel.
Each host gets its own xterm window, arranged on screen automatically. Typing in the control window sends input to all terminals simultaneously. Individual terminals can be selected for host-specific commands.
Clusters can be predefined in configuration files, grouping hosts by function (web servers, databases, etc.). Clusters can include other clusters, building hierarchies for complex environments.
PARAMETERS
-l username
Username for SSH connections.-f file
Read hosts from file (one per line).-T terminal
Terminal application to use.-L
List configured clusters.-c config
Use alternate configuration file.-o options
Pass options to SSH.-t title
Set window title.-q
Quiet mode, suppress warnings.-d
Enable debug output.
CONFIGURATION
Clusters defined in ~/.clusterssh/clusters:
dbservers db1 db2
all webservers dbservers
CAVEATS
Requires X11 display; cannot run in headless environments. Screen real estate limits practical simultaneous connections (typically 10-20 hosts). All hosts receive identical input; be careful with destructive commands. Network latency differences may cause commands to execute at slightly different times.
HISTORY
ClusterSSH was written by Duncan Ferguson and first released in the early 2000s. It addressed the common need to manage multiple similar servers before configuration management tools like Ansible became widespread. The tool remains popular for ad-hoc tasks and interactive troubleshooting where simultaneous access to multiple hosts is beneficial.


