Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Add Net::SFTP for Win 2008

by marto (Cardinal)
on Feb 18, 2016 at 11:30 UTC ( [id://1155537]=note: print w/replies, xml ) Need Help??


in reply to [SOLVED] Add Net::SFTP for Win 2008

I don't see Net::SFTP listed in the ppm index for that repo, it does have Net-SFTP-Foreign and Net-SFTP-Foreign-Backend-Net_SSH2.

"Reading the doc, I found I should use ppm"

I don't see any mention of this in Net::SFTP, can you tell me where you see this? You may also want to look at the reviews/bugs for this module. Consider Net::SFTP::Foreign

Replies are listed 'Best First'.
Re^2: Add Net::SFTP for Win 2008
by Burps (Novice) on Feb 18, 2016 at 11:43 UTC
    OK, I might have not been very precise :
    My goal is to be able to do SFTP from the Windows server, whatever module I use, I don't really mind (for now...).

    Following your advice, I tried to install Net::SFTP::Foreign :
    ppm> install Net::SFTP::Foreign Downloading www.sisyphusion.tk packlist...redirect Downloading Net-SFTP-Foreign-1.53...redirect Downloading Net-SFTP-Foreign-1.53...redirect Downloading Net-SFTP-Foreign-1.53...failed 500 Can't locate object met +hod "new" via package "LWP::Protocol::https::Socket" ppm install failed: 500 Can't locate object method "new" via package " +LWP::Protocol::https::Socket" ppm> install LWP::Protocol::https::Socket ppm install failed: Can't find any package that provide LWP::Protocol: +:https::Socket
    I thought maybe the 2nd repo was a problem, so deleted it, and retried :
    ppm> repo delete 2 Repo 2 deleted. ppm> install Net::SFTP::Foreign Downloading Net-SFTP-Foreign-1.53...redirect Downloading Net-SFTP-Foreign-1.53...redirect ppm install failed: 501 Protocol scheme 'https' is not supported (Cryp +t::SSLeay not installed)
    Same error, again
    Any recommendation ?
      ppm install failed: 501 Protocol scheme 'https' is not supported ...

      Seems odd to me that https is being called on to download from a http site.
      I've not seen this sort of error before with PPM.

      UPDATE: Try running 'ppm log' (or just 'log' if you're in the ppm shell) immediately after the error has happened. That will hopefully give a better idea of what's going wrong.

      There are, however, other problems with the sisyphusion repo at the moment. The hosts have messed with its accessibility again, so it looks like I'll have to contact them .... again.
      I keep getting "403 forbidden" errors - even though all files are readily available via the browser.
      Last time this happened they had to "whitelist one of ModSecurity rules", so I guess some dickhead has messed with those rules again.

      You can still install Net-SSH2 on your perl-5.8.8 by grabbing http://www.sisyphusion.tk/ppm/x86/Net-SSH2-58.tar.gz.
      Place that file in some directory along with the following file named Net-SSH2.ppd:
      <?xml version="1.0" encoding="UTF-8" ?> <SOFTPKG NAME="Net-SSH2" VERSION="0,56,0,0"> <TITLE>Net-SSH2</TITLE> <ABSTRACT>Support for the SSH 2 protocol via libssh2</ABSTRACT> <AUTHOR>Rafael Kitover</AUTHOR> <PROVIDE NAME="Net::SSH2" VERSION="0.56" /> <IMPLEMENTATION> <OS NAME="MSWin32" /> <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> <CODEBASE HREF="Net-SSH2-58.tar.gz" /> </IMPLEMENTATION> </SOFTPKG>
      (Beware of line wrapping if you copy'n'paste that code.)

      Then 'cd' to that directory and run:
      ppm install Net-SSH2.ppd --force
      Then go through the same rigmarole for Net-SFTP-Foreign and Net-SFTP-Foreign-Backend-Net_SSH2 .... yuk !!

      Grab http://www.sisyphusion.tk/ppm/x86/Net-SFTP-Foreign-58.tar.gz and http://www.sisyphusion.tk/ppm/x86/Net-SFTP-Foreign-Backend-Net_SSH2-58.tar.gz.

      Net-SFTP-Foreign.ppd needs to be:
      <?xml version="1.0" encoding="UTF-8" ?> <SOFTPKG NAME="Net-SFTP-Foreign" VERSION="1,77,0,0"> <TITLE>Net-SFTP-Foreign</TITLE> <ABSTRACT>Secure File Transfer Protocol client</ABSTRACT> <AUTHOR>Salvador Fandino Garcia</AUTHOR> <PROVIDE NAME="Net::SFTP::Foreign" VERSION="1.77" /> <IMPLEMENTATION> <OS NAME="MSWin32" /> <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> <CODEBASE HREF="Net-SFTP-Foreign-58.tar.gz" /> </IMPLEMENTATION> </SOFTPKG>
      Net-SFTP-Foreign-Backend-Net_SSH2.ppd needs to be:
      <?xml version="1.0" encoding="UTF-8" ?> <SOFTPKG NAME="Net-SFTP-Foreign-Backend-Net_SSH2" VERSION="0,09,0,0"> <TITLE>Net-SFTP-Foreign-Backend-Net_SSH2</TITLE> <ABSTRACT>Run Net::SFTP::Foreign on top of Net::SSH2</ABSTRACT> <AUTHOR>Salvador Fandino Garcia</AUTHOR> <PROVIDE NAME="Net::SFTP::Foreign::Backend::Net_SSH2" VERSION="0.0 +9" /> <IMPLEMENTATION> <OS NAME="MSWin32" /> <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> <CODEBASE HREF="Net-SFTP-Foreign-Backend-Net_SSH2-58.tar.gz" / +> </IMPLEMENTATION> </SOFTPKG>
      (Again - beware of line wrapping if you copy'n'paste that code.)

      I'll report back here once I've verified that accessibility to the sisyphusion repo has been restored. (I'm actually currently able to access it with the PPM that ships with StrawberryPerl, but not the one that ships with ActivePerl-5.8.9 .... strange.)

      Cheers,
      Rob
        Great !!! OK, First, the ppm log command reminded me that I went through a proxy : it's the one who messed up with http/https.
        2016-02-18T15:39:45 <6> [Web.pm:63] GET http://ppm4.activestate.com/MS +Win32-x86/ 5.8/822/S/SA/SALVA/Net-SFTP-Foreign-1.53.tar.gz ==> 302 Found (345 byt +es in 0.63 sec - 1 KB/s) 2016-02-18T15:39:45 <6> [Web.pm:63] GET http://ppm4-be.activestate.com +/MSWin32-x 86/5.8//818/S/SA/SALVA/Net-SFTP-Foreign-1.53.tar.gz ==> 302 Found (150 +6 bytes in 0.43 sec - 3 KB/s) 2016-02-18T15:39:45 <6> [Web.pm:63] GET https://MYPROXYURL..../&URI=ht +tp://ppm4- be.activestate.com/MSWin32-x86/5.8//818/S/SA/SALVA/Net-SFTP-Foreign-1. +53.tar.gz& URL_Cat=Technology/Internet&Status_Code=403&Decision_Tag=BLOCK_WEBCAT +==> 501 Protocol scheme 'https' is not supported (Crypt::SSLeay not i +nstalled) (141 bytes in 0.04 sec - 3 KB/s) 2016-02-18T15:39:45 <3> [ppm:85] ppm install: 501 Protocol scheme 'htt +ps' is not supported (Crypt::SSLeay not installed) at D:/Appli/Perl/l +ib/ActivePerl/PPM/Client.pm line 1003. ...propagated at D:\Appli\Perl +\bin/ppm line 998.
        I then used your method : Download the package manually, copied the .ppd, and IT WORKED !!

        Thank you very much

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1155537]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-25 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found