1. Disable Root Login
Edit config: nano /etc/ssh/sshd_config
nano /etc/ssh/sshd_config
Find PermitRootLogin and set to no.
PermitRootLogin
no
2. Use SSH Keys
Paste your public key into ~/.ssh/authorized_keys.
~/.ssh/authorized_keys
3. Restart SSH
systemctl restart ssh
Welcome to Ubuntu!After logging in as root, your first task is to update the system repositories...
Ubuntu uses UFW (Uncomplicated Firewall).Allow SSH first: ufw allow ssh (or allow 22/tcp).Allow...
Protect SSH from brute force attacks.apt install fail2ban -yStart the service:systemctl start...