in reply to Net SSH problems

Net::SSH::Perl seems to work for me.
#!/usr/bin/perl use strict; no warnings; use Net::SSH::Perl; use constant HOST => 'localhost'; use constant USER => 'user'; use constant PASS => 'password'; use constant CMD => 'wc'; my $ssh = Net::SSH::Perl->new( HOST, protocol => 2, debug => 1, ); $ssh->login(USER, PASS); my $intext = 'X' x 10632; my ($stdout, $stderr, $exit) = $ssh->cmd(CMD, $intext); print "remote output is: ", $stdout, "remote stderr is: ", $stderr, "\n", "remote exit status is: ", $exit, "\n";

Replies are listed 'Best First'.
Re^2: Net SSH problems
by perlinmyveins (Novice) on Nov 15, 2010 at 12:55 UTC
    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.

      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.