1. Setting Up Authentication En Masse

Setting Up Authentication En Masse

Managing many hosts is a quite challenging task. There are many tools to solve the problem. My favorite is pdsh.

Running a command across a set of hosts is as simple as following:

Together with dshbak (which is a part of pdsh package) you can do even cooler things. Like, check which systems have yum:

Or which systems run older version of MySQL

To make pdsh work you need to setup key based authentication. It becomes a challenge if the number of hosts is large.

Setting Up Authentication With Expect

Another great tool that was developed to conquer the problem is expect.
A script that logs in and installs a public key on a remote host:

Now, to setup the public key on a set of hosts we can run auth.exp in a loop:

Have a question? Ask the experts!

Previous Post Next Post