The pssh tool is great. Just great. At SEOmoz we use a number of deployment schemes, but every so often I find myself needing to log into 50 machines and perform some simple one-off command. I’ve written such a line many times:
1
|
|
This is fine if the command is quick, but it really sucks if it’s
something that takes more than just a few seconds. So in the absence of
needing to use sudo (and thus the -t
flag), pssh makes it easy to run these
all in parallel:
1
|
|
Coercing pssh to create a pseudo-tty to enable sudo commands was a little tricky, though:
1 2 |
|