Administering multiple ssh shells simultaneously with cssh

This article was published 6 years ago. Due to the rapidly evolving world of technology, some concepts may no longer be applicable.

cssh is a tool that lets you administer multiple ssh sessions at the same time. Whilst it’s not advised for production use, it’s a huge timesaver for some common tasks.

The best way to understand what it does it to watch the following video. Although it’s recorded on Windows, it works just the same on Linux/OSX.

If you want to install it, you need the clusterssh package.

On Debian:

sudo apt-get install clusterssh

On Redhat:

sudo yum install clusterssh

As well as providing muliple hosts, you can use shell expansion to connect to lots of machines at once:

cssh michaeldev-{01..10}

Once all the windows appear, put your mouse over the grey box and start typing. Your characters should appear in every SSH window that cssh opened. It also supports sending
control characters (e.g. ctrl+L to clear the screen) and pasting from the system’s clipboard

Thoughts on this post

Leave a comment?