Run one command on many Linux servers, install pssh, works on Mac


  1. sudo easy_install pip
  2. sudo pip install pssh
  3. Create a file with the list of servers you want to control, call it servers or something similar
  4. pssh -h servers "date"
  5. Put your ssh pub key up to all of them
    1. pssh -h servers -i "echo 'ssh-rsa AA...wh me@myfqdn' >> /home/user/.ssh/authorized_keys"
Taken: http://kaspergrubbe.dk/2012/using-pssh-for-executing-parallel-ssh-commands/

Note: csshX is very nice if you want to see all terminals at once as you type, more later

Comments

Popular posts from this blog

Debugging pfsense firewall rules clearly and easily

Direct ssh to a server via proxy using putty/plink on Windows

telnet vs netcat