Hardening a Server: SSH Settings, ufw, Fail2ban, Automatic Updates and Least Privilege
To turn off password logins on Ubuntu, put the setting in a drop-in under /etc/ssh/sshd_config.d/ that is read before cloud-init's file and verify it with sshd -T, because sshd uses the first value it reads. On the Bookstore server we show the second session rule, enabling ufw in the right order, Docker bypassing ufw for published ports, Fail2ban and least privilege with systemd, all with real output.
14 Nov 2026
·
16 min
·
4