in reply to Net::SSH::Perl - stops script execution on authentication failure
You can feed it with the full list of servers and the operations to perform and let it take care of everything:
use Net::OpenSSH::Parallel; my $pssh = Net::OpenSSH::Parallel->new; for my $server (@servers) { $pssh->add_host($server, timeout => 10, passwd => $passwd); } $pssh->push('*', cmd => {stdout_file => "/tmp/uname-%HOST%"}, 'uname') +; $pssh->push('*', cmd => {stdout_file => "/tmp/dmesg-%HOST%"}, 'dmesg') +; ... $pssh->run;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::SSH::Perl - stops script execution on authentication failure
by GA_L (Initiate) on Apr 26, 2010 at 08:35 UTC |