in reply to Re^2: Net::SSH2 and Trapeze, in-band authentication
in thread Net::SSH2 and Trapeze, in-band authentication
Doing non-blocking IO with Net::SSH2 is far from being easy. You can see how it is done in my module Net::SSH::Any using select to check when new data arrives on the SSH socket (the code is here, see the __io3 method).
Another possibility that usually works is to send all the input data (login and commands) in one go and then capture everything in blocking mode until you get and EOF. You will have to add an additional command to close the connection from the remote side (i.e. exit).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Net::SSH2 and Trapeze, in-band authentication
by FloydATC (Deacon) on Apr 05, 2013 at 12:07 UTC |