This is something that you'll only want to do after you've set up the key exchange with your clients. Otherwise, clients will be locked out of doing remote logins.
Disabling username/password logins
Hands-on lab – disabling root login and password authentication
For this lab, use the same server VM that you used for the previous lab. Let's get started:
- On either an Ubuntu or a CentOS server VM, look for this line in the sshd_config file:
#PasswordAuthentication yes
- Remove the comment symbol, change the parameter value to no, and restart the SSH daemon. The line should now look like this:
PasswordAuthentication no
Now, when the botnets scan your system, they'll see that doing a brute-force password...