punitpawar has asked for the wisdom of the Perl Monks concerning the following question:
-------------------------------- SO for my ssh_args hash above, I am not sure what value should I include for the key 'Identity_files' I tried to point it to the PPK file which I have with me...but it did not help at all.... I get the following outputuse Net::SFTP; use Net::SSH::Perl::Auth; #!/usr/bin/perl $ENV{HOME} = "C:\\Perl\\myscripts\\etc"; my $host = 'test.secure01.batch.netgiro.com'; my %args = ( user => 'vistaprint_test', ssh_args => { identity_files => ["/home/ssh/id_rsa"], protocol=>'2,1', debug=>'true'} ); my $sftp = Net::SFTP->new($host, %args); print "connected!";
Any help on this would be highly appreciated....I am on a Windows machine . Please let me know if any more info is needed .... Thanks a lot for the help !!!DEVPPAWAR: Reading configuration data C:\Perl\myscripts\etc/.ssh/confi +g DEVPPAWAR: Reading configuration data /etc/ssh_config DEVPPAWAR: Connecting to test.secure01.batch.netgiro.com, port 22. DEVPPAWAR: Remote protocol version 2.0, remote software version OpenSS +H_4.3 DEVPPAWAR: Net::SSH::Perl Version 1.34, protocol version 2.0. DEVPPAWAR: No compat match: OpenSSH_4.3. DEVPPAWAR: Connection established. DEVPPAWAR: Sent key-exchange init (KEXINIT), wait response. DEVPPAWAR: Algorithms, c->s: 3des-cbc hmac-sha1 none DEVPPAWAR: Algorithms, s->c: 3des-cbc hmac-sha1 none DEVPPAWAR: Entering Diffie-Hellman Group 1 key exchange. DEVPPAWAR: Sent DH public key, waiting for reply. DEVPPAWAR: Received host key, type 'ssh-dss'. DEVPPAWAR: Host 'test.secure01.batch.netgiro.com' is known and matches + the host key. DEVPPAWAR: Computing shared secret key. DEVPPAWAR: Verifying server signature. DEVPPAWAR: Waiting for NEWKEYS message. DEVPPAWAR: Send NEWKEYS. DEVPPAWAR: Enabling encryption/MAC/compression. DEVPPAWAR: Sending request for user-authentication service. DEVPPAWAR: Service accepted: ssh-userauth. DEVPPAWAR: Trying empty user-authentication request. DEVPPAWAR: Authentication methods that can continue: publickey,gssapi- +with-mic,p assword. DEVPPAWAR: Next method to try is publickey. DEVPPAWAR: Next method to try is password. DEVPPAWAR: Trying password authentication. DEVPPAWAR: Will not query passphrase in batch mode. DEVPPAWAR: Authentication methods that can continue: publickey,gssapi- +with-mic,password. . . . DEVPPAWAR: Next method to try is publickey. DEVPPAWAR: Next method to try is password. Permission denied at C:/strawberry/perl/site/lib/Net/SFTP.pm line 62
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to establish SFTP connection to a server using a ppk file
by thewebsi (Scribe) on Jul 20, 2012 at 06:27 UTC | |
by punitpawar (Sexton) on Jul 20, 2012 at 15:32 UTC | |
by thewebsi (Scribe) on Jul 20, 2012 at 18:45 UTC |