Right, I tried this, and although obviously necessary, (I am after all swapping from write to read on an object that is something like a file handle.) sending an EOF after finishing the data write did not solve all the problems. At first it worked exactly as expected, then I increased the size of the data sent to 100k and this is what I got:
ssh created ssh connected ssh authenticated cmd is wc intext length is 100000 0 1 32768 remote exit status is 0 bytes returned is 24 bytes
Note that intext length is measured at the local machine, and the numbers come from wc at the remote end - it only got 32k. 24 bytes returned looks correct.

It WAS necessary to set blocking(1) (presumably the default would have been ok) , without this NO input at all was received by wc, but the process still ran and returned output , 0 0 0 in that case.

I tried this to another Ubuntu box with exactly the same results.

So Net::SSH2 still seems broken, but now in a way that is very similar to the way Net::SSH::Perl is broken.

Hmmm.


In reply to Re^4: Net SSH problems by perlinmyveins
in thread Net SSH problems by perlinmyveins

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.