Cluster SSH

Have a handful of servers you need to perform the same commands on, e.g., keeping their software packages up to date using aptitude:

aptitude update && aptitude safe-upgrade && aptitude clean

So, you’re performing the same procedure on each host: logging in, executing aptitude, logging out… But WAIT! There’s Cluster SSH for you. ­čśÇ

The idea is simple: type in a command into one console and multiplex that input to several remote, i.e., SSH sessions.

For Mac OS X, csshX (also available as homebrew formula) comes in handy as it provides that multiplexing support for Terminal.app.

ClusterSSH

Open a console in Terminal.app and type in

csshX user1@host1 user2@host2 user3@host3 ...

(providing appropriate user@host combinations for your needs, of course).

Then, you enter your commands, e.g., aptitude update into the red control console. As you can see in the screenshot, the keystrokes are the sent to all open shells. Updating a bunch of servers became… a piece of cake. Hooray for the lazy admin!

Share Comments
comments powered by Disqus