From owner-freebsd-perl@FreeBSD.ORG Sat Apr 8 23:06:56 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 2771516A41B for ; Sat, 8 Apr 2006 23:06:56 +0000 (UTC) (envelope-from ashok.shrestha@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D69543D64 for ; Sat, 8 Apr 2006 23:06:46 +0000 (GMT) (envelope-from ashok.shrestha@gmail.com) Received: by nproxy.gmail.com with SMTP id m18so481562nfc for ; Sat, 08 Apr 2006 16:06:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=H6ve7OWVNS/gNkD021C2yeuZQh1i12tlWi6V7L2Dp29NHP5rCFxHm/0f3di/YbWznJWBbkPMKDyRISWIGWElI09el9iyAbXAkoHwFtSXTio+FRTF34MUGvXD5XHjP3OKW1EkpNEp5bxItwaa4zHy416IoePzU6Rb006EIHvOXlo= Received: by 10.49.64.20 with SMTP id r20mr2229220nfk; Sat, 08 Apr 2006 16:06:41 -0700 (PDT) Received: by 10.49.93.3 with HTTP; Sat, 8 Apr 2006 16:06:41 -0700 (PDT) Message-ID: <79e2026f0604081606w3f9327dbv2129c0c58aeb9945@mail.gmail.com> Date: Sat, 8 Apr 2006 19:06:41 -0400 From: "Ashok Shrestha" To: freebsd-perl@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: 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: Sat, 08 Apr 2006 23:06:56 -0000 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 =3D Net::SSH::Perl->new("10.0.0.243", 'debug' =3D> '1'); $ssh->login("username", "password"); Here is my error: ./test.pl Reading configuration data /root/.ssh/config Reading configuration data /etc/ssh_config Allocated local port 1023. Connecting to 10.0.0.243, port 22. Remote version string: SSH-2.0-OpenSSH_3.8.1p1 FreeBSD-20040419 Remote protocol version 2.0, remote software version OpenSSH_3.8.1p1 FreeBSD-20040419 Net::SSH::Perl Version 1.30, protocol version 2.0. No compat match: OpenSSH_3.8.1p1 FreeBSD-20040419. Connection established. Sent key-exchange init (KEXINIT), wait response. Algorithms, c->s: 3des-cbc hmac-sha1 none Algorithms, s->c: 3des-cbc hmac-sha1 none Entering Diffie-Hellman Group 1 key exchange. Sent DH public key, waiting for reply. Received host key, type 'ssh-dss'. Host '10.0.0.243' is known and matches the host key. Computing shared secret key. Verifying server signature. Waiting for NEWKEYS message. Enabling incoming encryption/MAC/compression. Send NEWKEYS, enable outgoing encryption/MAC/compression. Sending request for user-authentication service. Service accepted: ssh-userauth. Trying empty user-authentication request. Authentication methods that can continue: publickey,keyboard-interactive. Next method to try is publickey. 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 Here is the relevant portion of my /root/.ssh/config # Host * # ForwardAgent no # ForwardX11 no # RhostsRSAAuthentication no # RSAAuthentication yes # PasswordAuthentication yes # HostbasedAuthentication no # BatchMode no # CheckHostIP no # AddressFamily any # ConnectTimeout 0 # StrictHostKeyChecking ask # IdentityFile ~/.ssh/identity IdentityFile ~/.ssh/id_rsa # IdentityFile ~/.ssh/id_dsa # Port 22 # Protocol 2,1 # Cipher 3des # Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc= ,aes256-cbc # EscapeChar ~ # VersionAddendum FreeBSD-20050903 Any ideas what I'm doing incorrect? -- Ashok Shrestha