Dsh

From Wikitech

DSH stands for dancer's shell / distributed shell and is a way to run commands via SSH on many hosts at once.


Since agent forwarding was disabled, this is more of a pain. However, deployers can use:

SSH_AUTH_SOCK=/run/keyholder/proxy.sock dsh -F 20 -M -g mediawiki-installation -r ssh -o -oUser=mwdeploy -o -oIdentitiesOnly=yes -o -oIdentityFile=/etc/keyholder.d/mwdeploy.pub -- [command]

From a deployment server, to run a command on all MediaWiki boxes.

If you want to run a command on a group of hosts for some other service, check Keyholder and change the name of the key file appropriately.

The reason you need to specify the identity file is that the keyholder has a lot of keys and quite likely your one is far enough down the list that ssh will offer 6 other keys first to the remote end, 6 wrong keys that is, and then will get told off for too many bad auth attempts.