That's telling you that Net::SFTP, which underlies Net::SFTP::Recursive, only supports SSH2 and not SSH1

Not really!

Net::SFTP implements version 3 of the protocol, that's the one supported by most servers regardless of its supported SSH protocol version.

What happens is that the underlaying buggy Net::SSH::Perl is trying to open two channels inside the same SSH connection but the server only supports one channel per connection:

host.fqdn.tld: channel 0: new [client-session] host.fqdn.tld: Requesting channel_open for channel 0. host.fqdn.tld: channel 0: open confirm rwindow 32768 rmax 16384 host.fqdn.tld: channel 1: new [client-session] host.fqdn.tld: Requesting channel_open for channel 1. host.fqdn.tld: Channel open failure: 1: reason 4: Server supports one +session per SSH client

Then, Net::SFTP does not check that the channel was successfully open, tries to send the INIT command anyway and fails.

For comparison, opening a SFTP connection with OpenSSH:

$ ssh -v localhost -s sftp ... debug1: Authentication succeeded (publickey). debug1: channel 0: new [client-session] debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug1: Sending environment. debug1: Sending env LC_MESSAGES = en_AG.utf8 debug1: Sending env LANG = en_US.UTF-8 debug1: Sending subsystem: sftp
It just opens a channel and uses it for SFTP.

In reply to Re^2: Net::SFTP::Recursive problem with ssh_args => [use_pty => 0 ] by salva
in thread Net::SFTP::Recursive problem with ssh_args => [use_pty => 0 ] by gman

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.