Fail2Ban is an intrusion prevention software framework that protects computer servers from brute-force attacks.
Fail2ban detects repeated failed logins, and bans the IP address. Subsequent attempt to establish SSH connection from this IP will be blocked. It is available as package in most Linux distro repositories. It works out of the box without configuration. I highly recommend installing it in all Linux servers.
Unban an IP address
sudo fail2ban-client set sshd unbanip 188.8.131.52
List jail names
sudo fail2ban-client status
List blacklisted IP addresses for SSHD
sudo fail2ban-client status sshd