local: Connecting to ***********, port 22.
local: Remote protocol version 2.0, remote software version OpenSSH_3.0.2p1
local: Net::SSH::Perl Version 1.23, protocol version 2.0.
local: No compat match: OpenSSH_3.0.2p1.
local: Connection established.
local: Sent key-exchange init (KEXINIT), wait response.
local: Algorithms, c->s: 3des-cbc hmac-sha1 none
local: Algorithms, s->c: 3des-cbc hmac-sha1 none
local: Entering Diffie-Hellman Group 1 key exchange.
local: Sent DH public key, waiting for reply.
local: Received host key, type 'ssh-dss'.
local: Host '****************' is known and matches the host key.
local: Computing shared secret key.
local: Verifying server signature.
local: Waiting for NEWKEYS message.
local: Enabling incoming encryption/MAC/compression.
local: Send NEWKEYS, enable outgoing encryption/MAC/compression.
local: Sending request for user-authentication service.
local: Service accepted: ssh-userauth.
local: Trying empty user-authentication request.
local: Authentication methods that can continue: publickey.
local: Next method to try is publickey.
Permission denied at /opt/perl/lib/site_perl/5.6.1/Net/SFTP.pm line 37
Line 37 of SFTP.pm is:
$ssh->login($param{user}, $param{password});
The remote SFTP host uses public/private keys and only needs a username (ie. user@host) to login - all of which is in my code:
Any ideas what the problem might be?use Net::SFTP; my %args = (ssh_args => []); $args{user} = $user; push @{ $args{ssh_args} }, port => 22; my $sftp = Net::SFTP->new($host,%args);
In reply to Net::SFTP permission denied but sftp works by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |