Getting "Too many authentication failures" from every ssh server I've been using

  • This link may help answer your question in regards to the error message of "Too many authentication failures"

superuser.com: Too many authentication failures for username

  • Per the manpage for ssh-keygen, the ssh-keygen -R command:

    Removes all keys belonging to hostname from a known_hosts file

    So keys are removed are those from ssh-servers that are configured on your client's ~/.ssh/know_hosts files and have no effect on the error you are receiving from the server side.

  • With regards to your home server and the message:

    Permission denied (publickey,password)

    The server may be configured to only allow key-based authentication. You may need to check your /etc/ssh/sshd_config and change PasswordAuthentication no to PasswordAuthentication yes if you are trying to authenticate with a username and password.

  • Finally you may want to execute the ssh command with the -v option (adding up to 3 v's for more detailed information) in order to view helpful messages about how your ssh client is interacting with the ssh server. You may also require the -i' option in order to use the proper key configured in your servers~/.ssh/authorized_keys` file.

    Your command may look like this:

    ssh -i '~/.ssh/workplace_server_rsa' -v user@workplace_server_address


Too many authentication failures

This message is caused by having too many failed authentication attempts given the permitted limits enforced on the remote SSH server. This could mean that you've multiple identities added in your SSH agent and your SSH client offered too many which didn't work.

Here are few suggestions:

  • Add -v to see if that's the case (you've using too many identities).
  • List added identities by ssh-add -l.
  • Remove failing identity from the agent by: ssh-add -d.
  • You may also deletes all identities by ssh-add -D and re-add only relevant one.
  • If you've access to SSH server, check the MaxAuthTries option (see: man sshd_config).

    Related post: What is a connection for sshd_config's 'MaxAuthTries' limit?

  • If none of this help, make sure whether you're using the right credentials or file.