SOLVING SSH ERROR: TOO MANY AUTHENTICATION FAILURES FOR
You may encounter the following error when you try to remotely login to a machine using ssh.
Received disconnect from xxx.xxx.xxx.xxx: 2: Too many authentication failures for username
The reason behind this is that your ssh-agent is offering multiple keys to the server. T To see what is happening under the hood, type
ssh -v username@hostname
To solve this issue, create or edit your “~/.ssh/config” file with the following content
To have ssh use only the your_particular_key for all hosts under the same domain, you can replace the first line with “HOST *.the_domain_name”. Enjoy!