Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: SSH for windows

by BernieC (Pilgrim)
on Aug 07, 2018 at 14:32 UTC ( #1219998=note: print w/replies, xml ) Need Help??


in reply to Re: SSH for windows
in thread SSH for windows

Activestate doesn't know about it and there's no libssh2 or ssh2.dll or whateverit might be called on windows on my win7 system. I tried installing Net::SSH2 and, not surprisingly, got

Looking for libraries... Unable to find a working version of library ssh2 in the following dire +ctories:

I've downloaded libssh2 to my nearby Unix system and it looks like it can be built for Windows but I haven't a clue how to do that. I'm guessing I have "make" machinery and a C compiler because CPAN uses that to build stuff. Off on another research project to see how to build libssh2. {a lot of packages take pity on us poor Windows folk and provide already compiled versions for windows. Alas, not libssh2.}

Replies are listed 'Best First'.
Re^3: SSH for windows
by marto (Cardinal) on Aug 07, 2018 at 14:44 UTC

    By default ActiveState doesn't come with a C compiler, or build tools. Many CPAN modules contain no C code, pure perl so you may never had needed this so far. If you're going to be using Perl on windows you can make your life a lot easier by switching to Strawbery Perl, since it ships with a sane development environment, lots of additional modules and libraries as standard. libssh2 install doc. You can see how builds/packages everything.

      By default ActiveState doesn't come with a C compiler, or build tools.

      True, but (at least for 32-bit ActivePerl) ActiveState's repository does include PPM modules for dmake and MinGW. Once those are installed, ActivePerl is then able to install any module from CPAN (including XS based modules). Of course, the big catch is access to the matching ActiveState repository. For older versions of ActivePerl, that will require purchasing support from ActiveState. (I believe that there are extra steps and/or caveats to get 64-bit ActivePerl to have the appropriate/compatible compiler and tools in order to install modules directly from CPAN.)

      Currently, my preference is to use Strawberry Perl. For any businesses that need/require a higher level of support and are able to afford it, ActiveState's ActivePerl may be a better solution for them.

        In the past I've recommended ppm MinGW package (not module) to install MinGW & dmake. Anecdotally it seems to me that there are fewer non ActiveState hosted PPM repos around, the list in PPM::Repositories seems not to be maintained (dead URLs, perl v5.18 is the latest listed), they still don't have a 5.28 release available. There's a 50/50 chance our client will ask us to migrate from Solaris to Windows, at which point I'd recommend Strawberry over AS.

      I've now installed Strawberry perl {but haven't uninstalled activestate yet...:o)}. strawberry perl seems very good!

      One question: is there a strawberry perl equivalent of the 'ActivePerl User Guide'? It's a nice HTML page that pops up and gives you easy access to all the HTML formatted man pages for all the packages. It looks like Strawberry Perl doesn't include HTML man pages -- are they easy to generate? I can cobble up an ActiveState-like front end for it if the pages are all about. I've download the perldoc.perl.org HTML docs but that package is nice but doesn't include hardly any of the packages I use. I'll try looking at makefile to see how the HTML pages are generated when a package is installed.

      Also, do I correctly gather that the equivalent of the "perl package manager" with Activestate is just "cpan"? {but so far Strawberry has run all of my programs with no additional packages loaded, so it comes with a lot of stuff pre-installed!!}

        is there a strawberry perl equivalent of the 'ActivePerl User Guide'?

        You may want to check out Pod::POM::Web, which according to the acknowledgements section of its documentation indicates that it "deeply inpsired" by "the structure of HTML Perl documentation released with ActivePerl" among other things. I've used it before and I did find it convenient to have a web interface for the documentation of what was installed in my Perl environment.

        do I correctly gather that the equivalent of the "perl package manager" with Activestate is just "cpan"?

        Strawberry Perl comes with cpan and cpanm utilities. Both allow for installing modules directly from CPAN - including modules that need to be compiled (such as those that use XS). Although I have never used it with Strawberrry Perl, it does include PPM.

Re^3: SSH for windows
by Corion (Patriarch) on Aug 07, 2018 at 14:48 UTC

    ActiveState tries to provide a pre-built Net::SSH2, but that automated build fails because there is no prebuilt libssh2 available. If all else fails, maybe you can ask the maintainers of Strawberry Perl how they build their Net::SSH2 and libssh2.

    I've also used a pipe to plink.exe to fetch output from a remote machine, but that means you'll be fighting quoting across shell commands, which rarely is fun.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2022-05-26 05:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (93 votes). Check out past polls.

    Notices?