Below is the debug log. It appears that the public key authentication fails so it tries password authentication. Password authentication is not an option for this application. Anyone have any ideas how I can fix this?use Net::SFTP; use Net::SFTP::Util qw(fx2txt); %args = ( user => "thisuser", debug => 1, protocol => 2 ); $host = $ARGV[0]; $ftp = Net::SFTP->new($host, %args);
Thanks for any help you can give.server1: Reading configuration data /abc/userid/.ssh/config server1: Reading configuration data /etc/ssh_config server1: Connecting to xxxxxxxx.xxxx.xxx, port 22. server1: Remote version string: SSH-2.0-WS_FTP-SSH_6.1.1 server1: Remote protocol version 2.0, remote software version WS_FTP- +SSH_6.1.1 server1: Net::SSH::Perl Version 1.30, protocol version 2.0. server1: Connection established. server1: Sent key-exchange init (KEXINIT), wait response. server1: Algorithms, c->s: 3des-cbc hmac-sha1 none server1: Algorithms, s->c: 3des-cbc hmac-sha1 none server1: Entering Diffie-Hellman Group 1 key exchange. server1: Sent DH public key, waiting for reply. server1: Received host key, type 'ssh-dss'. server1: Host 'xxxxxxx.xxxx.xxx' is known and matches the host key. server1: Computing shared secret key. server1: Verifying server signature. server1: Waiting for NEWKEYS message. server1: Enabling incoming encryption/MAC/compression. server1: Send NEWKEYS, enable outgoing encryption/MAC/compression. server1: Sending request for user-authentication service. server1: Service accepted: ssh-userauth. server1: Trying empty user-authentication request. server1: Authentication methods that can continue: publickey,password +. server1: Next method to try is publickey. server1: Trying pubkey authentication with key file '/abc/userid/.ssh +/id_dsa' server1: Authentication methods that can continue: publickey,password +. server1: Next method to try is publickey. server1: Next method to try is password. server1: Trying password authentication. server1: Will not query passphrase in batch mode. server1: Login completed, opening dummy shell channel. server1: channel 0: new [client-session] server1: Requesting channel_open for channel 0. server1: channel 0: open confirm rwindow 300000 rmax 30000 server1: channel 1: new [client-session] server1: Requesting channel_open for channel 1. server1: Sending subsystem: sftp server1: Requesting service subsystem on channel 1. server1: channel 1: open confirm rwindow 300000 rmax 30000 server1: sftp: Sending SSH2_FXP_INIT server1: sftp: Remote version: 3
In reply to Net::SFTP authentication problem by SeekerOfTruth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |