--Edited--

It appears that you are right, I was able to replicate the issue by running the commands from the command-line. It also pointed out that the full output isn't there as previously thought.

I tested this on a friends router with a different version of the OS, same problem. I then changed the command to another one that has long output and I got the same results.

I then copied that output to a file on my system, and got the script to issue a cat on that file after logging in. This worked as expected.

To me, this definitely rules out the openssh libraries, the Net::OpenSSH module and perl it's self. It appears that the problem is with the amount of lines or data the router needs to output back to the script.

So I guess, to some degree, I am back to square 1. I will need to figure out how to interact with the router using expect (since Net::SSH::Expect worked for this task..)... oh boy...


In reply to Re^5: Net::OpenSSH multiple commands by mlebel
in thread Net::OpenSSH multiple commands by mlebel

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.