Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

problem with Net::SSH::Perl using dsa key authentication

by Nabuku (Initiate)
on Sep 29, 2003 at 21:40 UTC ( [id://295126]=perlquestion: print w/replies, xml ) Need Help??

Nabuku has asked for the wisdom of the Perl Monks concerning the following question:

Hi

I'm trying to write a simple ssh login script using Net::SSH::Perl. with regular password It's working without a problem, but when I try to use dsa key (my usual dsa key) it doesn't work.

here's the scritp:

----------------------------------------------------

#!/usr/bin/perl -w use strict; use Net::SSH::Perl; use Net::SSH::Perl::Auth; my @ids = ("/home/haim/.ssh/identity"); my %params = (     protocol => 2,     interactive => 1,     identity_files => \@ids, );      my $login = Net::SSH::Perl->new("coltrane", %params); my $auth = Net::SSH::Perl::Auth->new('PublicKey', $login); $auth->authenticate; $login->login("haim"); $login->shell;
--------------------------------------------------------------------------------

When I run this script I get an error:
Can't call method "agent" on an undefined value at /usr/local/share perl/5.8.0/Net/SSH/Perl/Auth/PublicKey.pm line 39, <GEN0> line 1.
I've looked into the Net::SSH::Perl::Agent manpage but I can't figure out how do I use it.

can anyone please help?

thanx
--
Haim

Replies are listed 'Best First'.
Re: problem with Net::SSH::Perl using dsa key authentication
by joshig (Initiate) on Jul 24, 2014 at 11:43 UTC
    Hi Haim, Did you get answer to your question? I am also facing same problem. could you please update me on this if you figured it out?

      You're probably better off asking a new question; people are less likely to see your reply here. And the OP hasn't been seen on PerlMonks in more than a decade.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://295126]
Approved by LazerRed
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-20 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found