On that note: one of ssh's lesser known features is the ability
to give a user the ability to only run ONE command on login by
adding the command to the authorized_keys file. Of course that
only makes sense for very specialised cases. But if you have a
tool that always needs to be run by an account that was specifically
created for that purpose it's a really tidy solution; you then
only need to do the loop and the ssh command. Or if you have the hosts
the keys are distributed to in a text file, one per line it gets as
simple as:
Code:
cat hosts|xargs -i ssh user@{}
Cheers,
Tink