Fix “SSH Too Many Authentication Failures” Error

To fix this error, you need to add the IdentitiesOnly with a value of yes, which instructs ssh to only use the authentication identity files specified on the command line or the configured in the ssh_config file(s), even if ssh-agent offers additional identities.

For example:

$ ssh -o IdentitiesOnly=yes goyun

Alternatively, if you want this to work for all ssh client connections, you can configure it in your ~/.ssh/config file.

$ vim ~/.ssh/config
Add the following configuration in the file, under the Host * section as shown in the screesnhot.

Host *
        IdentitiesOnly=yes

Comments