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

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.

Replies are listed 'Best First'.
Re^5: Net SSH problems
by syphilis (Archbishop) on Nov 16, 2010 at 00:22 UTC
    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