Skip Menu |

This queue is for tickets about the Net-SSH-Perl CPAN distribution.

Report information
The Basics
Id: 8690
Status: rejected
Priority: 0/
Queue: Net-SSH-Perl

People
Owner: Nobody in particular
Requestors: madsdyd [...] diku.dk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Problem with large stdin to cmd call
perl 5.8.0, $ ssh -V OpenSSH_3.5p1, SSH protocols 1.5/2.0, OpenSSL 0x0090701 I have a problem when giving a large (+60 KB) file to stdin in the cmd call. Transmitting the file will often fail. Enabling compression will "sometimes" solve it. Here are the code that will fail: # Set up the SSH connection my $ssh = Net::SSH::Perl->new($compile_host, debug => $debug, protocol => 2, compression => 1, options => [ "LogLevel DEBUG3", "ConnectionAttempts 2", "StrictHostKeyChecking yes", "BatchMode yes", "RhostsAuthentication no", "PasswordAuthentication no", "PreferredAuthentications publickey" ]) ; if (!defined $ssh) { # Error - unable to open connection &my_error("Error connecting to compile service"); } # Open it $ssh->login($compile_user); # Prepare stdin for the ssh program my $stdin = "ENVIRONMENT = $environment\n"; while (<$filehandle>) { $stdin .= $_; } close($filehandle); ############################################################ # Run the command # my ($out, $err, $exit) = $ssh->cmd("/home/someprog.pl", $stdin); When the file in filehandle is larger than some value, it will not always arrive at the receiver. Really, really annoying.
[guest - Wed Dec 1 10:07:10 2004]: Show quoted text
> When the file in filehandle is larger than some value, it will not > always arrive at the receiver.
More debugging hints that it may only be the eof that is not arriving. Perhaps the input channel is not properly closed.
Not fixing Heisenbugs at this point - try Net::SSH2.