eg2014 has asked for the wisdom of the Perl Monks concerning the following question:
Although everything works when the remote program outputs to stdout, when it outputs to stderr, and the output is large, my script hangs. /tmp/a is the smaller file and the script runs to completion. However /tmp/b is the larger file and causes the above to hang. Any information would be helpful. Thank you kind monks.use strict; use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new('localhost',debug => 1, protocol => '2,1 +'); $ssh->login('username','password'); my ($stdout, $stderr, $exit) = $ssh->cmd('cat /tmp/a 1>&2'); print $stdout . "\n"; print $stderr . "\n"; print $exit . "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Script hangs when executing command over ssh
by marinersk (Priest) on Jun 18, 2015 at 16:47 UTC | |
by eg2014 (Initiate) on Jun 18, 2015 at 17:00 UTC | |
by marinersk (Priest) on Jun 18, 2015 at 17:24 UTC | |
by eg2014 (Initiate) on Jun 18, 2015 at 18:28 UTC | |
by marinersk (Priest) on Jun 18, 2015 at 18:56 UTC | |
| |
|
Re: Script hangs when executing command over ssh
by salva (Canon) on Jun 19, 2015 at 06:53 UTC | |
|
Re: Script hangs when executing command over ssh
by eg2014 (Initiate) on Jun 18, 2015 at 18:38 UTC | |
by marinersk (Priest) on Jun 18, 2015 at 19:01 UTC |