I'd just like to chime in here that I was experiencing the same problem as madhurikl. I unexplainedly could not establish a connection on my SLES11 SP1 remote hosts. The above code snippet is useful for debugging exactly what the problem is. In my case, SLES was rejecting the authentication.
error021code = -18 error022error_name = LIBSSH2_ERROR_PUBLICKEY_UNRECOGNIZED error023error_string = Authentication failed (username/password)
For whatever reason, the Net::SSH2 methods auth and auth_password just don't work on SLES11. However, auth_keyboard works perfectly fine. Problem solved. However, I suspect this should really just be a lesson to both of us to start using keys for authentication in the future.
-MattIn reply to Re^4: Net::SSH2::Channel with exec, reads 0 bytes on suse while works fine on ubuntu
by howheels
in thread Net::SSH2::Channel with exec, reads 0 bytes on suse while works fine on ubuntu
by madhurikl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |