[Ssh-sftp-perl-users] Net::SSH::Perl hanging
Brought to you by:
dbrobins
From: Chris r <lit...@ya...> - 2005-02-22 23:07:54
|
I've got a script that connects to various servers to run some admin commands. It works for the most part, but upon hitting certain servers it seems to hang waiting for the command to finish. im just using the standard syntax... $ssh = Net::SSH::Perl->new($BACKSERVER, port => '22'); $ssh->login("$user", "$pass"); ($out, $err, $exit) = $ssh->cmd("somecommand"); I've tried piping and sending the command output to the background and null, it helps on one server but not another and my script hangs unable to finish. ($out, $err, $exit) = $ssh->cmd("somecommand &"); ($out, $err, $exit) = $ssh->cmd("somecommand > /dev/null &"); Any workarounds on how to get the command to return and continue on with execution would help. Thanks. |