TMUX with a "ClusterSSH"-like behaviour.
Clone or download
dennishafemann Merge pull request #24 from dandunckelman/fix_connection_string_with_…

Make the params cut to the end of the line, so it includes ports
Latest commit 57d9634 Nov 2, 2016




tmux is a terminal multiplexer, like e.g. screen, which gives you a possibility to use multiple virtual terminal session within one real terminal session. tmux-cssh (tmux-cluster-ssh) sets a comfortable and easy to use functionality, clustering and synchronizing virtual tmux-sessions, on top of tmux. No need for a x-server or x-forwarding. tmux-cssh works just with tmux and in an low-level terminal-environment, like most server do.

Dependencies / Installation

$ apt-cache search --names-only tmux
tmux - Terminal-Multiplexer

... under debian-based systems:

$ sudo apt-get install tmux


Take a look at the pre-build deb-packages.

Usage / Example

First, take a look at the help- and syntax-texts:

$ tmux-cssh --help

You can connect to a single server, with a single connection-data:

$ tmux-cssh -sc my-user-name@my-own-server

You can connect multiple server, with different connection-data:

$ tmux-cssh -sc my-user-name@my-own-server -sc second_user@second_server

You can connect to multiple server, with a single connection-data:

$ tmux-cssh -u my-user-name -sc my-own-server -sc second_server

You can connect to multiple server, the short way:

$ tmux-cssh -u my-user-name my_server my_second_server my_third_server my_and_so_on_server

You can load predefined parameters settings from your user-home-settings-file ~/.tmux-cssh.

$ tmux-cssh -cs [dev\|test\|productive]_servers

If you want to just open your multiple server in a grid, but don't want every keystrokes shared around you can add the parameter for "don't synchronize panes".

$ tmux-cssh -cs [dev\|test\|productive]_servers -ds

It is possible to use different tmux layouts, default is tiled:

$ tmux-cssh -tl even-vertical -u my-user-name my_server my_second_server my_third_server my_and_so_on_server

User-Home-Settings-file ~/.tmux-cssh

This file is located in the user home directory, from tmux-cssh-calling user, and includes predefined parameters in a single line.

test_servers:-sc -sc
productive_servers:-sc -sc -sc

Each line can be analysed into to values key and parameters, seperated by a colon (:).


Using the parameters -cs|--config-setting the key name is search via a single string or a (grep valid) regular expression.

$ tmux-cssh -cs [dev\|test\|productive]_servers
... or ...
$ tmux-cssh -cs server[1-9]

Multiple -cs

With support of multiple -cs parameters you can now be more flexible.

clients:-sc -sc
servers:-sc -sc
all:-cs clients -cs servers
$ tmux-cssh -cs clients
$ tmux-cssh -cs servers
$ tmux-cssh -cs clients -cs servers
$ tmux-cssh -cs all

Combine parameters

tmux-cssh adds all given parameters to it's environment before calling the final tmux-session. So that means all parameters can be combined in each way.


$ tmux-cssh -f /tmp/temp-server-hosts -cs "fixed_dev_server\|auth_user"

Host file -f /tmp/temp-server-hosts

Config-Settings name fix_dev_server in ~/.tmux-cssh

auth_user:-u me_as_an_auth_user

Finally tmux-cssh works like if you called ...

$ tmux-cssh -u me_as_an_auth_user -sc -sc dev_server_1 -sc -sc -sc


There is a simple, useful and comfortable GUI set on top of tmux-cssh: TMUX-CSSH-GUI

TMUX-CSSH-GUI @ github