Date: Sat, 8 Apr 2006 19:06:41 -0400 From: "Ashok Shrestha" <ashok.shrestha@gmail.com> To: freebsd-perl@freebsd.org Subject: unable to SSH using Net::SSH::Perl Message-ID: <79e2026f0604081606w3f9327dbv2129c0c58aeb9945@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?79e2026f0604081606w3f9327dbv2129c0c58aeb9945>