In order to determine if the problem lays on Net::OpenSSH or on the SSH layer, instead of capturing the output with capture, redirect it to some file:
$index++; $ssh->system({ timeout => $sshtimeout, stdin_data => "\n", stdout_file => "/tmp/stdout_${index}.txt" }, $sshcmd."\n");

Then look into those files, if there is still some missing data, it would mean that the problem is on the SSH layer, probably on the SSH server. Otherwise, the more likely cause of the problem would be some bug on Net::OpenSSH.

It is not uncommon for network equipment to have defective SSH implementations. When that happens, if you are lucky, a firmware update may solve it. Otherwise, you may need to employ some ugly workaround like activating pagination and using Expect to request pages.


In reply to Re: Net::OpenSSH loosing lines ins reply by salva
in thread Net::OpenSSH loosing lines ins reply by Andy16

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.