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 working you need to setup key based authentication. It becomes a challenge if number of hosts is large.

Setting up authentication with expect

Another great tool 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