in reply to Net::SSH::Expect error .SSHAuthenticationError Login timed out

It seems that your login succeeds. Maybe public key authentication has already been set up and you don't need to log at all.

Anyway, post your code. Otherwise is not possible to really know what you are doing wrong.

And, BTW, why are you using Net::SSH::Expect? usually it is not the best alternative.

  • Comment on Re: Net::SSH::Expect error .SSHAuthenticationError Login timed out

Replies are listed 'Best First'.
Re^2: Net::SSH::Expect error .SSHAuthenticationError Login timed out
by williams554 (Sexton) on Oct 25, 2011 at 23:53 UTC

    Hello salva,

    What is a better alternative to Net::SSH:Expect?

    I use it but don't know any better.

    Thanks,
    Rob

      Nowadays, Net::SSH2 or Net::OpenSSH are probably your best options unless you are connecting to one of those routers or switches that only provided a crippled restricted shell or a broken SSH implementation. In that case, Net::Telnet (its docs explain how to use it over SSH) or even just Expect are in my opinion the way to go.

      Net::SSH::Expect is just not reliable, specially over slow networks, due to the feeble way it uses to detect when remote commands finnish.

        Hi All, Thanks for all your suggestions, there was an issue with the $login_output pattern match. I have one more query Net::SSH::Expect is too slow perticularly with 1.09 version .Please suggest me to improve the perfomance any part of checking or code can i comment out.