Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Expect Script help needed

0 views
Skip to first unread message

Digger

unread,
Aug 10, 2007, 3:47:36 AM8/10/07
to
Hi,

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.


Michael Trausch

unread,
Aug 24, 2007, 2:02:49 AM8/24/07
to

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

0 new messages