[CentOS] sshd gives false "Too many authentication failures"

Sat Nov 20 10:03:20 UTC 2021
Thomas Stephen Lee <lee.iitb at gmail.com>

On Sat, Nov 20, 2021 at 2:32 PM Andreas Fournier
<andreas.fournier at runbox.com> wrote:
>
> I just came across something strange with my fully updated Centos7
> server. When I try to ssh into it the same way I've always done I get
> "Too many authentication failures". This just came out of the blue. I'm
> using the root account and a password. But in my sshd_config it still
> reads
> #MaxAuthTries 6
> Which I think is the default.
>
> From the console I can log in fine and when I look in the logs for sshd
> I can just see the the attempts I just made, that are less than six and
> no previous denied attemps.
>
> Any clues what's going on?
>

I got the same error once.
In my case the problem was ssh tried to log in with ssh keys before
giving a password prompt.