in reply to Remotely Start/Stop Services
Hi,
You can have your script read a text file that has the server names given one below the other. Then, your script would read each line of the text file, pick up the servername, do a ping or an nslookup and if thats successful, it would execute the command. To remotely execute the commands, try the Net::SSH2 Module or Net::SSH::Any module.
Net::SSH2 comes pre installed with Strawberry Perl or DWIM Perl. Net::SSH::Any you'll have to install and it will run on top of Net::SSH2. Hope this helps.
Perlpetually Indebted To PerlMonks
http://dwimperl.com/windows.html is a boon for Windows.use Learning::Perl; use Beginning::Perl::Ovid; print "Awesome Books";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Remotely Start/Stop Services
by dasgar (Priest) on Feb 02, 2013 at 05:54 UTC | |
by perl514 (Pilgrim) on Feb 03, 2013 at 10:24 UTC |
In Section
Seekers of Perl Wisdom