in reply to SFTP on Windows
So far so good, i managed to install all the packages and now the libssh2 through your help. My code is:
use strict; use Net::SFTP::Foreign; use Net::SSH2; my $ssh2 = Net::SSH2->new(); my $host = "127.0.0.1"; my $user = "Admin"; my $port = "22"; #my $timeout = "5"; my $key = "C:/Users/BeckerB/Desktop/SFTP Schluessel/Private.ppk"; #$ssh_cmd = "C:/Users/BeckerB/Desktop/SDH1/applikation/model/modules/N +et/OpenSSH.pm"; print $key; my $sftp = Net::SFTP::Foreign->new( $host, user=>$user, port=>$port, b +ackend=>'Net_SSH2', timeout=>30, key_path=>$key ); print "\ntest1\n"; #$sftp = Net::SFTP::Foreign->new($host, user=>$user, key_path=>$key, s +sh_cmd=>); $sftp->die_on_error("SSH connection failed"); print "\nok\n";
I now get the following failure: "SSH connection failed: authentication failed: LIBSSH2_ERROR_AGENT_PROTOCOL (-42): failed connecting agent at C:\Users\BeckerB\Desktop\SDH1\applikation\controller\test.pl line 16" i already tryed to google the failure code but i couldnt find something, anybody got an idea what im still doing wrong?
|
|---|