Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: SSH for windows

by Corion (Patriarch)
on Aug 07, 2018 at 11:38 UTC ( #1219987=note: print w/replies, xml ) Need Help??

in reply to SSH for windows

Have you looked at Net::SSH2?

Strawberry Perl includes it, so you likely don't even have to install it on Windows.

Replies are listed 'Best First'.
Re^2: SSH for windows
by BernieC (Pilgrim) on Aug 07, 2018 at 14:32 UTC

    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.}

      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.

        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 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!!}

      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?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2023-06-04 23:45 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (22 votes). Check out past polls.