Securing SSH Access Properly: Keys Instead of Passwords, Change the Port, Set Up fail2ban
Password login over SSH is the most common way outsiders become root. Generate a key pair, disable password login, change the port, and set up fail2ban – step by step, with the commands to follow along.