Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm having a good time using the NET::SSH::PERL under linux, but when I have to do the same thing under WinXP with ActivePerl, I had the worst time of my life.

It appears thar to install the NET::SSH::PERL you'll need to install IO::PTY in advance which dose not support windows actually. But there is a way out, that is using Cygwin, so I installed the Cygwin, and installed the NET::SSH::PERL successfully of course, but when I opened the cmd, and typed "perl myTest.pl", I got the error message like "Can not locate the net/ssh/except.pm......".

Oh my .., so here is what I want know:.

1. How to mount the Cygwin to make sure that when I am using the activeperl, it can successfully locate the pm that installed under the cygwin directory?

2. Is there any easier way to make it possible to use the ssh with acticveperl (I also tried OpenSSH, but I still need to use the Expect.pm, which means I have to install the Cygwin again...)

Thanks for any answer in advance^_^

  • Comment on Using NET::SSH::PERL under Windows (with ActivePerl)

Replies are listed 'Best First'.
Re: Using NET::SSH::PERL under Windows (with ActivePerl)
by salva (Canon) on Jul 14, 2010 at 06:34 UTC
    Your post is confusing, what do you want to install Net::SSH::Perl or Net::SSH::Expect?

    Net::SSH::Perl sometimes it is difficult to install because it has a lot of dependencies but IO::Pty is not one of them! Also, it runs under ActiveState Perl (and also, AFAIK, under Strawberry Perl and cygwin).

    Net::SSH::Expect does only work under cygwin and requires IO::Pty but installing it is a no-brainer if you do it from the cygwin cpan shell.

    Anyway, nowadays, the best SSH module for usage under windows is probably Net::SSH2.

      Thanks for your answer, I know the NET::SSH2 only support for the SSH2 protocal, what can I use if I also want to support SSH1?

Re: Using NET::SSH::PERL under Windows (with ActivePerl)
by Khen1950fx (Canon) on Jul 14, 2010 at 06:29 UTC

      Thanks for your answer, I tried the Net::SSH::W32Perl, but I get the following message:

      Checking if your kit is complete...

      Looks good

      Warning: prerequisite Convert::ASCII::Armour 1.4 not found.

      Warning: prerequisite Data::Buffer 0.04 not found.

      Warning: prerequisite Digest::BubbleBabble 0.01 not found.

      Warning: prerequisite IO::Select::Trap 0.02 not found.

      Warning: prerequisite Net::SSH::Perl 1.23 not found.

      It appears that I still have to install Net::SSH::Perl on windows...(is that right?)

        You'll need to install the prerequisites, and, yes, you'll need to install Net::SSH::Perl on Windows. Try it with cpan first. If that doesn't work, then manually install it using
        perl Makefile.PL Configure machine=none make install
        Just a reminder: SSH2 is default on Windows. Net::SSH::W32Perl only supports SSH2 because of Math::GMP.
Re: Using NET::SSH::PERL under Windows (with ActivePerl)
by dk (Chaplain) on Jul 14, 2010 at 09:11 UTC
    1. How to mount the Cygwin to make sure that when I am using the activeperl, it can successfully locate the pm that installed under the cygwin directory?

    That would be of no use. It's generally a bad idea mixing two perl installations, so don't expect ActiveState perl binary would run ok even if from under cygwin shell. You'll need cygwin's own perl, that is installed under /usr/bin/perl or wherever your /cygwin directory is mounted (check output of "mount").

    Also, did you try strawberry perl?