in reply to (DUPE) Is there a better way ? : Net::SSH - Detecting success or fail for a connection

You have the same question in twice.

Connection test : Net::SSH::Perl : $ssh->login - detecting failure

Check there for my response and good luck.
  • Comment on Re: Is there a better way ? : Net::SSH - Detecting success or fail for a connection