in reply to SFTP on Windows

Net::OpenSSH does not work on Windows!

Your options on Windows are to use the Net::SSH2 backend for SFTP: Net::SFTP::Foreign::Backend::Net_SSH2 or some external SSH client as plink.

Net::SSH2 is bundled in Strawberry Perl. For ActiveState perl you can get a precompiled package from the sisyphusion repository (ppm install http://www.sisyphusion.tk/ppm/Net-SSH2.ppd).

Replies are listed 'Best First'.
Re^2: SFTP on Windows
by Poolstar (Acolyte) on Jul 30, 2018 at 11:24 UTC
    Thank you for the advice, but my ppm isnt able to conncect to sisyphusion, via Internet Explorer i can open up the page but ppm is telling me "ERROR: 500 Can't connect to www.sisyphusion.tk:80 (timeout)" have you heard about such a failure?

      Most likely, your browser connects to the outside world through a proxy. You will need to configure the same proxy settings with the ppm tool. Most likely, just setting up the HTTP_PROXY environment variable already is enough.

      EDIT: Firstly i would like to thank you all for the help so far, but im getting from one problem to another ;) After some problems with the ppm and proxy i finally managed to install Net::SSH2 Net::SFTP::Foreign and Net::SFTP::Foreign::Backend::Net_SSH2, by using ppm install "Modulename" --force after setting sisyphusion in the repository list, but when i now try to start my script:

      use strict; use Net::SFTP::Foreign; 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 get a failure: Unable to load backend Net_SSH2: Can't locate loadable object for module Net::SSH2 in @INC (@INC contains: ../model/GPS ../Xtensions ../model ../model/modules ../model/mymodules ../model/mymodules ../model/modules ../model ../Xtensions ../model/GPS C:/Users/BeckerB/Desktop/SDH1/server/perl/lib .) at ../model/modules/Net/SFTP/Foreign/Backend/Net_SSH2.pm line 15 Compilation failed in require at ../model/modules/Net/SFTP/Foreign/Backend/Net_SSH2.pm line 15. BEGIN failed--compilation aborted at ../model/modules/Net/SFTP/Foreign/Backend/Net_SSH2.pm line 15. Compilation failed in require at (eval 9) line 1. at C:\Users\BeckerB\Desktop\SDH1\applikation\controller\test.pl line 11 anyone got a problem like this before? Update: I reinstalled the packages. Now it works better

        It'd be easier to help if you showed how you installed the modules, the code you ran and exactly how it failed. How do I post a question effectively?. Copy and paste errors and code exactly.