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
Complete thread:
- How to catch error (or exit) when Receive hang - novanstar, 2008-11-04, 02:57
- Re: How to catch error (or exit) when Receive hang - wodDamir, 2008-11-04, 09:00
- Re: How to catch error (or exit) when Receive hang - novanstar, 2008-11-04, 20:19
- Re: How to catch error (or exit) when Receive hang - woddrazen, 2008-11-04, 20:25
- Re: How to catch error (or exit) when Receive hang - novanstar, 2008-11-04, 21:07
- Re: How to catch error (or exit) when Receive hang - woddrazen, 2008-11-04, 23:05
- Re: How to catch error (or exit) when Receive hang - novanstar, 2008-11-04, 23:56
- Re: How to catch error (or exit) when Receive hang - woddrazen, 2008-11-05, 00:03
- Re: How to catch error (or exit) when Receive hang - novanstar, 2008-11-05, 00:46
- Re: How to catch error (or exit) when Receive hang - woddrazen, 2008-11-05, 09:24
- Re: How to catch error (or exit) when Receive hang - novanstar, 2008-11-05, 19:05
- Re: How to catch error (or exit) when Receive hang - wodDamir, 2008-11-05, 19:20
- Re: How to catch error (or exit) when Receive hang - novanstar, 2008-11-06, 19:39
- Re: How to catch error (or exit) when Receive hang - wodDamir, 2008-11-05, 19:20
- Re: How to catch error (or exit) when Receive hang - novanstar, 2008-11-05, 19:05
- Re: How to catch error (or exit) when Receive hang - woddrazen, 2008-11-05, 09:24
- Re: How to catch error (or exit) when Receive hang - novanstar, 2008-11-05, 00:46
- Re: How to catch error (or exit) when Receive hang - woddrazen, 2008-11-05, 00:03
- Re: How to catch error (or exit) when Receive hang - novanstar, 2008-11-04, 23:56
- Re: How to catch error (or exit) when Receive hang - woddrazen, 2008-11-04, 23:05
- Re: How to catch error (or exit) when Receive hang - novanstar, 2008-11-04, 21:07
- Re: How to catch error (or exit) when Receive hang - woddrazen, 2008-11-04, 20:25
- Re: How to catch error (or exit) when Receive hang - novanstar, 2008-11-04, 20:19
- Re: How to catch error (or exit) when Receive hang - wodDamir, 2008-11-04, 09:00