SSH - There were 525 failed login attempts since the last successful login

I see this whenever I log in into my AWS EC2 Linux server using the ssh command:

Last failed login: Tue Dec 17 07:57:30 UTC 2019 from 222.186.190.92 on ssh:notty
There were 525 failed login attempts since the last successful login.
Last login: Fri Nov 29 17:33:58 2019 from 202.99.54.73

How can I stop these hacking and login attempts?

These are bots and automated tools that try to crack or hack your Linux/Unix server. There are several ways to stop it. First, disable password log in and enable only ssh key based login. Next, you can install fail2ban tool. See the following:


AND

Finally


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki