in reply to Is Net::SSH::Perl still supported? Can I install it on Centos 7?
Thanks to all the monks that helped me with this!
For the curious this is what it took to get Net::OpenSSH installed on Centos 7:
# yum install epel-release # yum install perl-Net-OpenSSH
And now the salient portion of my ssh module looks thusly:
my $ssh; my $key_path = $ENV{HOME} . '/.ssh/id_rsa'; if ( ops_cmd_status($cmd) ) { $ssh = Net::OpenSSH->new($cmd->{host}, user => $cmd->{user}, key_pa +th => $key_path); if ( $ssh->error ) { $cmd->{status} = 'failure'; ($cmd->{ssh_retcode}, $cmd->{ssh_retmsg}) = (0 + $ssh->error, '' + . $ssh->error); } } if ( ops_cmd_status($cmd) ) { ($cmd->{output}, $cmd->{std_err}) = $ssh->capture2($cmd->{command}) +; if ( $ssh->error ) { $cmd->{status} = 'failure'; ($cmd->{child_retcode}, $cmd->{child_retmsg}) = (0 + $ssh->error +, '' . $ssh->error); } chomp $cmd->{output}; chomp $cmd->{std_err}; }
Thanks again for everybody's help.
Thanks,
cbeckley
|
|---|