I am trying to do the Public Key Authemtication. But I am hetting an error saying "Can't call method "agent" on an undefined value at /usr/local/lib/perl5/site_perl/5.18.0/Net/SSH/Perl/Auth/PublicKey.pm line 42.". not sure why it is exiting as soon as it calls $auth_authenticate() thnaks --girijause strict; use warnings; use Net::SSH::Perl; use Net::SSH::Perl::Auth; use Net::SSH::Perl::Auth::RSA; use Net::SSH::Perl::Auth::PublicKey; use Net::SSH::Perl::Agent ; my @ids = ("/home/abc/.ssh/id_rsa"); my %params = ( 'protocol' => 2, 'interactive' => 1, 'identity_files' = +> \@ids, ); my $host = "server"; my $login = Net::SSH::Perl->new($host, %params)|| die "could not creat +e ssh object for host"; my $auth = Net::SSH::Perl::Auth->new('PublicKey', $login) || die "coul +d not create Auth object"; $auth->authenticate;
In reply to problem with Net::SSH::Perl using dsa key authenticatio by joshig
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |