Hardening SSH on a fresh Linux server

The first thing you should do on any new server is lock down SSH. Start by disabling password authentication and root login in /etc/ssh/sshd_config.

Then reload the service and confirm you can still log in with your key before closing the session.