Search code examples
perlsftpperl-module

Installing Net::SFTP and Net::SSH2 without CPAN


I am making a Perl script to fetch files from a Unix Server using SFTP. I want to search the file using Regex and then download it to my system folder. I am using ActivePerl and Windows 64 bit environment. I looked on various posts which suggested the best way is using Net::SFTP::Foreign::Backend::Net_SSH2 but I am facing lots of errors while installing Net::SFTP and Net::SSH2.I cannot CPAN from my system and tried with GCC and dmake. Net::SFTP is halting at Math::Pari and Net::SSH2 is asking for libraries libssh2. I downloaded libssh2 from here but not able to install it.

Also can I use any 3-d part OS tools like psftp through Perl to server my requirements.


Solution

  • 1. Net::SSH2 is not in offical PPM repositories. Install it using below:

    ppm install http://www.sisyphusion.tk/ppm/Net-SSH2.ppd
    

    Tested on Windows 7 and Perl 5.18.4

    enter image description here

    2. For Math::Pari check this answer Unable to install Math::Pari module