From owner-freebsd-perl@FreeBSD.ORG Tue Apr 11 04:42:25 2006 Return-Path: X-Original-To: freebsd-perl@freebsd.org Delivered-To: freebsd-perl@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 821D716A400 for ; Tue, 11 Apr 2006 04:42:25 +0000 (UTC) (envelope-from mv@thebeastie.org) Received: from p4.roq.com (ns1.ecoms.com [207.44.130.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3894A43D46 for ; Tue, 11 Apr 2006 04:42:23 +0000 (GMT) (envelope-from mv@thebeastie.org) Received: from p4.roq.com (localhost.roq.com [127.0.0.1]) by p4.roq.com (Postfix) with ESMTP id E962C4CD72; Tue, 11 Apr 2006 04:43:11 +0000 (GMT) Received: from [192.168.0.6] (ppp157-158.static.internode.on.net [150.101.157.158]) by p4.roq.com (Postfix) with ESMTP id 077224CD5D; Tue, 11 Apr 2006 04:43:10 +0000 (GMT) Message-ID: <443B33AC.4010809@thebeastie.org> Date: Tue, 11 Apr 2006 14:42:20 +1000 From: Michael Vince User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060213 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ashok Shrestha References: <79e2026f0604081606w3f9327dbv2129c0c58aeb9945@mail.gmail.com> In-Reply-To: <79e2026f0604081606w3f9327dbv2129c0c58aeb9945@mail.gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-perl@freebsd.org Subject: Re: unable to SSH using Net::SSH::Perl X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2006 04:42:25 -0000 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