[Ssh-sftp-perl-users] Net::SFTP and publickey
Brought to you by:
dbrobins
From: Jim M. <jim...@no...> - 2004-08-13 18:00:06
|
Hi I'm trying to setup a connection using publickeys, but I'm getting nowhere. I have a publickey in /export/home/jimmatt/.ssh/id_rsa. Here's the code: $sftp = Net::SFTP->new($server, ssh_args=>[port => "22"]); $sftp->get($remote_file, $localfile); Nothing fancy. Here's the output I get: morpheus: Reading configuration data /export/home/jimmatt/.ssh/config morpheus: Reading configuration data /etc/ssh_config morpheus: Connecting to test.duke.edu, port 22. morpheus: Remote protocol version 2.0, remote software version OpenSSH_3.8p1 morpheus: Net::SSH::Perl Version 1.25, protocol version 2.0. morpheus: No compat match: OpenSSH_3.8p1. morpheus: Connection established. morpheus: Sent key-exchange init (KEXINIT), wait response. morpheus: Algorithms, c->s: 3des-cbc hmac-sha1 none morpheus: Algorithms, s->c: 3des-cbc hmac-sha1 none morpheus: Entering Diffie-Hellman Group 1 key exchange. morpheus: Sent DH public key, waiting for reply. morpheus: Received host key, type 'ssh-dss'. morpheus: Host 'test.duke.edu' is known and matches the host key. morpheus: Computing shared secret key. morpheus: Verifying server signature. morpheus: Waiting for NEWKEYS message. morpheus: Enabling incoming encryption/MAC/compression. morpheus: Send NEWKEYS, enable outgoing encryption/MAC/compression. morpheus: Sending request for user-authentication service. morpheus: Service accepted: ssh-userauth. morpheus: Trying empty user-authentication request. morpheus: Authentication methods that can continue: publickey,password,keyboard-interactive. morpheus: Next method to try is publickey. morpheus: Next method to try is password. morpheus: Trying password authentication. morpheus: Will not query passphrase in batch mode. morpheus: Authentication methods that can continue: publickey,password,keyboard-interactive. morpheus: Next method to try is publickey. morpheus: Next method to try is password. morpheus: Trying password authentication. morpheus: Will not query passphrase in batch mode. morpheus: Authentication methods that can continue: publickey,password,keyboard-interactive. morpheus: Next method to try is publickey. morpheus: Next method to try is password. morpheus: Trying password authentication. morpheus: Will not query passphrase in batch mode. morpheus: Authentication methods that can continue: publickey,password,keyboard-interactive. morpheus: Next method to try is publickey. morpheus: Next method to try is password. Permission denied at /usr/local/lib/perl5/site_perl/5.8.5/Net/SFTP.pm line 37 I tried to specify the the identity file by using: $sftp = Net::SFTP->new($server, debug=>true, ssh_args=>[identity_files => "/export/home/jimmatt/.ssh/id_rsa", port => "22"]); but it didn't like that: morpheus: Service accepted: ssh-userauth. morpheus: Trying empty user-authentication request. morpheus: Authentication methods that can continue: publickey,password,keyboard-interactive. morpheus: Next method to try is publickey. Can't use string ("/export/home/jimmatt/.ssh/id_rsa") as an ARRAY ref while "strict refs" in use at /usr/local/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Auth/PublicKey.pm line 51. Any other way to try and specify this? Thanks. --------------------- Jim Matthews ISS Systems Administrator Duke University - Perkins Library Box 90196 Durham, NC 27708 Email: jim...@du... Voice: 919-660-5963 Fax: 919-684-6990 |