Skip Menu |

This queue is for tickets about the Net-SSH-Perl CPAN distribution.

Report information
The Basics
Id: 49850
Status: open
Priority: 0/
Queue: Net-SSH-Perl

People
Owner: Nobody in particular
Requestors: adam [...] ali.as
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: Doug Reed <r.douglas.reed [...] gmail.com>, bug-Net-SSH-Perl [...] rt.cpan.org, kmx <kmx [...] volny.cz>
Subject: Re: Win32 support for Net::SSH::Perl
Date: Sun, 20 Sep 2009 15:33:43 +1000
To: Curtis Jewell <perl [...] csjewell.fastmail.us>
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
You have a the login to strawberryperl.com, that has SSH access if you can't find anything better. Adam K 2009/9/19 Curtis Jewell <perl@csjewell.fastmail.us>: Show quoted text
> > > On Thu, 17 Sep 2009 10:27 -0400, "Doug Reed" <r.douglas.reed@gmail.com> > wrote:
>> Curtis, >> I see you opened a ticket on Net::SSH::Perl recently and stated that you >> intend to include this module in Strawberry in the October release. >> >> I wonder if you have had any success in getting this module to work.  I >> can >> compile and install it, and with a bit of hacking got it to ALMOST work.
> > I've gotten it to install (I just say local $ENV{HOME} = > $ENV{USERPROFILE} during the build), but haven't actually tried it or > looked at it much, as of yet. >
>> I have a need for SSH1 and SSH2 to support Router and Switch maintenance, >> and this support needs to be cross platform. >> >> I have not opened a ticket on CPAN, because from what I can see, this >> module >> is no longer supported, which is a shame because there is nothing to >> fully >> replace it.  Net::SSH2 can do SSH2 protocol, but not SSH1.  Anyway, with >> this in mind, I have tried to look at it myself to see if I could get it >> to >> work in Strawberry, because it meets my needs on every other platform.
> > If I have to, I'll ask about taking it up - but I have to admit that I > don't think I have access to an ssh-using server to test it against at > the moment... > but maybe I do.  I'll check. > > Would you mind sending me a patch against the current version to start > with? > > It may have to get pulled out of October if the situation is as bad as > you say it is. >
>> The module out of the box only supports Unix.  i.e. It makes assumptions >> about $HOME and such.  I have played with it, and fixed all of that stuff
> > That can be changed to File::Homedir::my_home() easily enough. The other > things may be tougher.  I'm cc'ing a few other people for advice, and > also cc'ing the bug address so that this gets logged as a ticket. >
>> and have it almost working in Windows, but it seems that it gets no data >> from the socket once it gets to 'client_loop', which is odd since it does >> logon and do authentication, so data is flowing until it gets to >> 'client_loop', and then it seems to loop between 'prepare_channels' and >> 'prepare_for_select' because it seems that $rb and $wb (which are >> pointers >> to anonomous arrays) are always empty.  ..  Or to put it another way... >> It >> gets as far as 'close_read' (if you run it with debug on) and then loops >> presumably because it never empties the buffer.  In an effort to debug >> the >> code I found that 'prepare_for_select' is entered once with ((!$rfd) && >> CHAN_INPUT_OPEN), then on the next loop (($rfd) && CHAN_INPUT_CLOSED), >> but >> since it only calls add() when (($rfd) && CHAN_INPUT_OPEN), add() never >> gets >> called. >> >> There is also Net::SSH::Win32Perl, but that code seems to change nothing >> at >> all.  I guess it gets past the blocking() problem which I solved In the >> native code by simply testing '$^O'  It still loops at 'close_read' >> trying >> to read the data.  Maybe this used to work with some ancient version and >> some change has broken it in the loop above so that it no longer works. >>  Anyway, I decided to ignore it completely and see if I could hack the >> native module into submission, but I am not good enough at debugging PERL >> to >> get farther than I have, so I thought I would pass my findings onto you >> to >> see if my findings would help. >> >> I think it would work OK if the looping problem were fixed.  (Maybe it >> should use IO::Socket::INET instead of the native socket interface to >> easily >> get past the non-blocking problem since I think IO::Socket::INET >> 'normalizes' the blocking interface.  The Native interface requires >> different handling for Windows...  Which is how I fixed it, but then it >> is >> harder to make it platform independent.) >> >> In the end, the simple question is has anyone ever figured out how to get >> Net::SSH::Perl to work in Windows?
> > I don't know. > -- > Curtis Jewell > swordsman@csjewell.fastmail.us > > %DCL-E-MEM-BAD, bad memory > -VMS-F-PDGERS, pudding between the ears > > [I use PC-Alpine, which deliberately does not display colors and pictures in HTML mail] > >
From: sdetweil [...] gmail.com
On Sun Sep 20 01:34:08 2009, adam@ali.as wrote: Show quoted text
> >> In the end, the simple question is has anyone ever figured out how
> to get
> >> Net::SSH::Perl to work in Windows?
> > > > I don't know. > > -- > > Curtis Jewell > > swordsman@csjewell.fastmail.us > >
posted a fix in the other bug entry. takes 4 changes 3 in Net::SSH::Perl 1 in IO::Select::Trap complete SSH support doesn't work however, a simple 'hostname' command to the remote server causes an error on the client, packet type 100 not supported.. I haven't found the SSH2 packet protocol doc anywhere to see what is missing.. might be a table entry to map packet type 100 to some existing handler.. (command response). sam