How to Fix “SSH Too Many Authentication Failures” Error
Sometimes, while trying to connect to a server via SSH, you may encounter the error “Received disconnect from x.x.x.x port 22:2: Too many authentication failures.”
In my case, the system is Ubuntu and joined to Active Directory. I can only use domain users to access the server, with a mandatory long password when I often mistyped the password.
The server only gives me two times the opportunity to login correctly.
To get the number of failures a specific user has, I used this command.
pam_tally2 --user yourid
And to reset it used this.
pam_tally2 --user yourid --reset