use Net::OpenSSH::Parallel; my $pssh = Net::OpenSSH::Parallel->new; while (my $element = <MYINPUTELEMENTS>) { if ($element =~ /(\d+)(\.\d+){3}/) { $pssh->add_host($element, user => $user, password => $password +); } } $pssh->all(cmd => { stdout_file => 'gss-%HOST%' }, 'ls -l / | wc -l') +; $pssh->all(cmd => { stdout_file => 'lcs2-%HOST%' }, 'ls -l /etc | wc - +l'); $pssh->run; my %errors = $pssh->get_errors; for my $host (keys %errors) { print "task failed for host $host: $errors{$host}\n" }
In reply to Re: Net::SSH2 not thread safe?
by salva
in thread Net::SSH2 not thread safe?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |