How To Update Many Debian Systems In One Step

Standard

Running system updates on a bunch of systems can be very annoying. As our monitoring system is setting me under presure with lots of critical messages about missing security updates on our Debian Linux servers every few days, I want to get rid of them quickly without logging in to every single host, executing aptitude update && aptitude upgrade one after another.

Using a shell script would be one option, but with the big disadvantage of loosing the control over the update process. So I was looking for a way to start interactive shells on all servers at the same time.

Finally I found clusterssh, which is installable via aptitude. The next step is to create a file with a list of hosts in the format [user@] [user@] [...]. After that you can call clusterssh with

cssh -c

Clusterssh will come up with a single terminal windows for each host and a small Tcl window, where you can run the commands from. Everything you type in will be sent to all hosts character wise. So you only have to type in aptitude update && aptitude upgrade one time and it will be executed on all hosts.