For some time now I have been suffering problems when trying to connect by SSH to the different remote computers that I have regardless of the port and address of the computer to which I want to connect (being on the LAN or on any Internet server ends with the same result)
At first, I solved it by searching the internet and adding the parameter -o IdentitiesOnly = yes
but since my memory is “fragile” and I don’t have to be typing more than necessary (especially when I can’t find it in the history of the command terminal) I decided to give a definitive and permanent solution to the error SSH Too Many Authentication Failures 😉
And is that the problem occurs because, by default, the SSH client tries with all the keys known by the ssh-agent every time we try to connect to a remote server which, apart from being inefficient, I find it somewhat insecure and unnecessary.
To avoid this, we can add to the file $ HOME /.ssh / config (if you don’t have this file, create it without problems) the following content
IdentitiesOnly = yes
And voila, you can connect without having to put the parameter indicated as “if nothing” had happened 😉
Change in the default SSH configuration that prevents the client from trying the different SSH keys in their connections to remote computers, which I hope will be useful to avoid having to remember one more parameter 😅
- Have you come to this article looking for a solution to SSH problem?
- Did you use the parameter IdentitiesOnly or did you know about this configuration option?
- Do you know another way to solve the problem SSH Too Many Authentication Failures?