It seems the remote server has a broken SSH implementation:
debug3: send packet: type 90 # This was the request to open a new channel (SSH_MSG_CHANNEL_OPEN) debug3: receive packet: type 91 debug2: channel 1: open confirm rwindow 12288 rmax 512 # That was the Ok response (SSH_MSG_CHANNEL_OPEN_CONFIRMATION) debug3: receive packet: type 1 Received disconnect from 10.10.3.6 port 22:2: Disconnect Protocol erro +r # And then, suddenly, an unexpected disconnect message saying "Prot +ocol error"

It is not completely uncommon for some SSH implementations, specially those found in network equipment, to not support more than just one session per connection or requiring it to be open at some specific time (i.e. just after the transport layer becomes ready). There is not much you can do to work-around these issues.

Net::SSH::Any has the Ssh_Cmd backend which uses ssh in the common way, but then you can not combine it with Net::Telnet. At least, not easily. Net::SSH::Any provides the pipe method, which returns an object emulating a socket... maybe the emulation is good enough for Net::Telnet... I don't know, never tried!


In reply to Re^3: Net::OpenSSH multiple sessions and legacy KEX problem by salva
in thread Net::OpenSSH multiple sessions and legacy KEX problem by pwlodawi

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.