Date: Tue, 11 Apr 2006 14:42:20 +1000 From: Michael Vince <mv@thebeastie.org> To: Ashok Shrestha <ashok.shrestha@gmail.com> Cc: freebsd-perl@freebsd.org Subject: Re: unable to SSH using Net::SSH::Perl Message-ID: <443B33AC.4010809@thebeastie.org> In-Reply-To: <79e2026f0604081606w3f9327dbv2129c0c58aeb9945@mail.gmail.com> References: <79e2026f0604081606w3f9327dbv2129c0c58aeb9945@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?443B33AC.4010809>
