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

Could I ask you to try it also with a value considerably larger than 32k, say 100k. There is some evidence that the particular threshold-of-malfunction may be system dependent, on the remote system?

Thanks very much for your help.

Replies are listed 'Best First'.
Re^3: Net SSH problems
by Khen1950fx (Canon) on Nov 15, 2010 at 14:08 UTC
    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.
      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