Jens Segers on

Run terminal commands on multiple servers using csshx

Every time I install updates on the servers I maintain, I use a little tool called csshx. It's a command-line tool that allows you to run terminal commands over SSH on multiple servers simultaneously.

It has been around for years and I have been promoting it to colleagues and developers every time I see them manually opening multiple terminal sessions. It's one of those convenient tools that can really boost your productivity if you have to do this often. So if this sounds familiar, give it a shot!

Go ahead and install csshx using Homebrew (yes it's mac only):

brew install csshx

Now use csshx to open terminal screens for all the servers you want to connect with:

csshx server1.com server2.com server3.com server4.com

This will automatically open multiple terminals with a (red) control terminal that duplicates your input to the multiple servers:

Doesn't that look awesome? Let me know if you've started using it on twitter!

Webmentions

Tweet about this blog post and you will appear below!