in reply to Re^2: Net SSH problems
in thread Net SSH problems

On my system, there's a limit of 32768. This will explain it better than I can. As I understand it, you can reset the limit.

Replies are listed 'Best First'.
Re^4: Net SSH problems
by perlinmyveins (Novice) on Nov 15, 2010 at 15:03 UTC
    Well, its an intresting theory, but as I understand it, this is standard input we are passing (the content of a file or stream). while this limit refers to the number of bytes in the command line arguments, which is a different thing. And it figures, after all, 32k is a great deal of command line argument, but a very small file.

    So if this was the answer I would have to say thats a design fault, the contents of a file should not be passwed on the command line.

    But it does rather confirm that you are seeing the same problem as I am.

      So if this was the answer I would have to say thats a design fault

      I get the same. For a simplistic workaround, instead of
      $chan->write("$intext\n"); $chan->send_eof();
      do
      while (length $intext > 32767) { $chan->write(substr($intext, 0, 32768, '')); } $chan->write("$intext\n"); $chan->send_eof();
      Doing that, I then get:
      ssh created ssh connected cmd is wc intext length is 100000 1 1 100001 remote exit status is 0 bytes returned is 24 bytes
      Cheers,
      Rob