Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there some program to run the same command in several servers with SSH from MacOSX?

share|improve this question

Take a look at ClusterSSH. I have used this to great effect from an OSX 10.5 workstation, but cannot verify that it works correctly from 10.6. I highly suspect it should work fine.

share|improve this answer

iTerm2 can do it. Create one bookmark per server and set the command for each bookmark to ssh . Then use the 'send input to all tabs' feature. You can open a bunch of bookmarks at once using the bookmarks window (cmd-m).

share|improve this answer

There are a number of tools for doing this. One example is Parallel SSH. It looks like you have to compile it from source for macos but it should seve as a good starting point.

This article has a good description of how pssh works. Also, the comments on that story cover other alternatives like Capistrano. I used to use Tentakel for this purpose but it looks like that project has gone dead.

Note that a lot of the tasks you might want to automate with a parallel ssh tool are really good candidates for automation with a configuration management tool like puppet or chef or cfengine.

share|improve this answer
ha I think some of us are giving the 'big answer' solutions and some the quick expedient answer solutions. – Phil Hollenback Jan 12 '11 at 19:15

I think iTerm can do this (

share|improve this answer
It can't send the same input to all tabs, but not establish the connections automatically, as far as I know. – J. Pablo Fernández Jan 12 '11 at 18:40

You could use any number of ssh multiplexers: e.g., dsh (dancer shell), pdsh. Check MacPorts.

Or, perhaps somewhat more simply: for x in $( cat hosts.txt ); do ssh $x ; done

More complicated things, like Chef's knife, Capistrano, func, or helm, also exist.

share|improve this answer
up vote 0 down vote accepted

I ended up using csshX:

alt text

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.