unable to SSH using Net::SSH::Perl
Michael Vince
mv at thebeastie.org
Tue Apr 11 04:42:25 UTC 2006
Ashok Shrestha wrote:
>Hi all,
>
>System Info:
>FreeBSD 6.0-RELEASE
>p5-Net-SSH-Perl-1.30
>perl-5.8.7
>
>
>
>I'm trying to use Net::SSH::Perl to connect to an SSH server.
>
>
>
>Here is the script:
>
>
>#!/usr/bin/perl -w
>
># test.pl
>
> use Net::SSH::Perl;
>
> my $ssh = Net::SSH::Perl->new("10.0.0.243", 'debug' => '1');
> $ssh->login("username", "password");
>
>Here is my error:
> ./test.pl
> Trying pubkey authentication with key file '/root/.ssh/id_rsa'
> Authentication methods that can continue: publickey,keyboard-interactive.
> Next method to try is publickey.
> Permission denied at ./test_SSH.pl line 8
>
>
>
It looks like its trying to revert to public key authentication but is
probably getting stuck because you don't have ssh-agent loaded to
provide a private key, you could use a passphraseless key or you could
load up a ssh-agent to provide the key.
I tried your code and the wrong password but it worked anyway simply
because I have ssh-agent loaded with my pass phrase.
A alternative answer is that your trying to login as root and your
remote ssh server is in its default configuration which is to deny root
logins.
Mike
More information about the freebsd-perl
mailing list