chomp (my @hosts = `cat /.root/sample.txt`); my $pssh = Net::OpenSSH::Parallel->new(); $pssh->add_host($_, user=> $user_name, master_stderr_discard =>1, master_opts => [-o => "StrictHostKeyChecking no" ]) fo +r @hosts; $pssh->push('*', command => 'egrep "^dba|^sea|^adm|^mwa|^ae" /etc/pass +wd'); $pssh->run;
I use ssh keys where possible but the ssh public key is not added in all 190 servers.
I do not use 190 different password.. just one that can connect to all the servers
I cannot capture the output of the /etc/passwd found and produce a csv.. that is why I did not went through with parallel.. if you have a solution.. please let me know
In reply to Re^2: parse /etc/passwd and output it as csv in hundred servers
by garcimo
in thread parse /etc/passwd and output it as csv in hundred servers
by garcimo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |