Thursday 28 March 2013

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

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Interview questions: 2020-12

Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer  Networking Layer 1 vs Layer 4 haproxy u...