I have not personally used Net::SSH2:Channel, and the cpan documentation does not make it clear what the flag means for blocking. I would assume that 1 means blocking, but are you sure? You are not checking the results of any of the methods after the connect. However, if the auth was failing, I'm pretty sure the channel would return undef, so your first use of it would fail in an obvious way.
in reply to Net::SSH2::Channel with exec, reads 0 bytes on suse while works fine on ubuntu
Your example program is not displaying $len, so I'm assuming that in some previous incarnation, you printed it out. If you did not, and are going by the print statement for $output, then the read method could have failed.
Have you compared the ssh2 library versions for the 2 remote systems? I would make sure I was using the same lib version on both before I checked anything else.