I need some help, I'm not a natural scripting person, and need some
pointers. I have a need to automate a change on 200+ servers and edit the
nsswitch.conf file, all connect via ssh. I was thinking of using expect
script, but unsure as how to read in text file, containing ServerIP and root
password. Basically i need to connect to each server, make the necessary
changes and log the results. Sounds simple if you know what your doing....
any help much appreciated.
The best way to do this is to create the file as you need it on all of
those servers, and then use a shell for loop to run scp to copy them
all. This is pretty easy if you're using ssh keys.
If you're not using ssh keys, and still stuck with using passwords, then
I am afraid that you're going to be tied up and rather bored for awhile,
and your hands are going to wish by the end of the day that you'd
created ssh keys for those servers by the time you type in the 200th
server's password.
-- Mike