Re: How to catch error (or exit) when Receive hang (General questions)
Hi,
Can you please try something like this:
[code]
...
$ssh->{Timeout} = 5;
$ssh->Connect();
$ssh->WaitFor('weonlydo@linux:~$');
$ssh->Send( ls -al\n );
use Win32::OLE;
$Win32::OLE::Warn = 3;
do {
print $ssh->Receive();
} while ($@==0);[/code]
I'm not Perl guru. This worked for me but I receive in output error also.
Drazen