Promo plaatje


    Home > blog > howto > Fix ssh ‘Too many authentication failures’

FIX SSH ‘TOO MANY AUTHENTICATION FAILURES’

If you’re like me, you might have a lot of ssh keys installed and this might prevent you from logging into servers with the following message as a result:

“Too many authentication failures”.

As far as I understood this happens due to SSH trying each key on the client for logging and failing due to hitting the serverMaxAuthTries in the SSH server configuration. I use the following quick fix to work around this, by forcing SSH to use a password instead of a public key:

ssh -o PubkeyAuthentication=no username@hostname.com

I’m pretty sure there has to be a better, more durable solution for this issue, but the above fix allows you to at least gain access to your server again. Btw I use this on Linux (Ubuntu 10.04) with OpenSSH_5.3p1 Debian-3ubuntu4.

— ♦ —

5 Responses to Fix ssh ‘Too many authentication failures’

  1. Alex Garel says:

    Thanks you save me some time :-)

  2. user says:

    .ssh/config:
    IdentitiesOnly yes

  3. Abid Mujtaba says:

    Edit (or create if missing) ~/.ssh/config and enter the following section in to it to specify which key-pair to use for a particular host machine:

    Host alias_of_your_choice

    User user_name
    Hostname address_of_remote_machine
    Port port_number_if_not_22
    IdentifyFile ~/.ssh/name_or_private_key_file

    The use of alias is extremely useful since ti will allow you to connect with ‘ssh alias_of_your_choice’ rather than ‘ssh -p port_number user_name@_address_of_remote_machine’.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>