Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

6 Answers

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
add comment

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). https://sites.google.com/site/iterm2home/

share|improve this answer
add comment

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 linux.com 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
add comment

I think iTerm can do this (iterm.sf.net)

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
add comment

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
add comment
up vote 0 down vote accepted

I ended up using csshX:

alt text

share|improve this answer
add comment

Your Answer

 
discard

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.