joshig has asked for the wisdom of the Perl Monks concerning the following question:
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: problem with Net::SSH::Perl using dsa key authenticatio
by AppleFritter (Vicar) on Jul 25, 2014 at 10:09 UTC | |
|
Re: problem with Net::SSH::Perl using dsa key authenticatio
by Mr. Muskrat (Canon) on Aug 04, 2014 at 21:04 UTC |