in reply to Net::SSH2 Command Timeout Before Completion
use Net::OpenSSH; my $ssh = Net::OpenSSH->new('root@192.168.123.5'); $ssh->error and die "unable to connect to remote host: ". $ssh->error; my $fh = $ssh->pipe_out("/sbin/service", "syslog", "restart") or die "command failed: " . $ssh->error; print while <$fh>; close $fh or die "command failed: $?";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Net::SSH2 Command Timeout Before Completion
by taim (Initiate) on Jun 29, 2010 at 23:57 UTC | |
by sierpinski (Chaplain) on Jun 30, 2010 at 01:52 UTC | |
by taim (Initiate) on Jun 30, 2010 at 15:25 UTC |