TecMint published a tutorial on how to lock and unlock a user after multiple failed SSH login attempts.
How to Lock and Unlock User After Failed SSH Login Attempts
In this article, we will show how to lock a user or root account after a specifiable number of failed login attempts in CentOS, RHEL and Fedora distributions.