Essential Measures:
- Disable password login (
PasswordAuthentication no) - Use SSH keys only
- Change default port 22
- Set up Fail2Ban
Example /etc/ssh/sshd_config:
Port 2222 PermitRootLogin no PasswordAuthentication no PubkeyAuthentication yes AllowUsers gamer admin
Tip: Use ssh-copy-id to quickly deploy your public key.