Re: [OT] ssh login script - Please Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Dan Track wrote:
>> I appreciate this is OT but could someone just give me a little
>> advice, I've written this script to logon on each server then
>> restart the ntpd daemon. The problem I have is it only restarts the
>> daemon for the last server provided in the list, any ideas as to why
>> and how to fix it?
>
> While I'm not offering any help on why your expect script is failing
> you, I would say that if you have a need to ssh into multiple machines
> to copy config files and restart services, you should look into tools
> like func and puppet.  Func is perfect for quick, one-off commands.
> Puppet is better for complete configuration management.
>
> As a t-shirt from Reductive Labs¹, the makers of Puppet said, "SSH in a
> loop is _not_ a solution." ;)
>
> ¹ http://reductivelabs.com/images/Layouts.pdf

Alternately, Dan ought to, instead of an expect script, use a non-root
user, key-based authentication (bypass the password), scp the conf file to
the non-root user's homedir, and sudo to provide root level privs to move
the conf file into place and restart NTP.

-- 
Mike Burger
http://www.bubbanfriends.org

Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org

To be notified of updates to the web site, visit:

https://www.bubbanfriends.org/mailman/listinfo/site-update

or send a blank email message to:

site-update-subscribe@xxxxxxxxxxxxxxxxx

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux