SSH hardening on a VPS
Lock down SSH on your VPS: switch to key only login, disable root and passwords with a drop in config, and layer Fail2ban and a VPN on top.
Filtering by topic #ubuntu-24-04 · clear
Lock down SSH on your VPS: switch to key only login, disable root and passwords with a drop in config, and layer Fail2ban and a VPN on top.
Your cloud firewall or handwritten iptables may only cover IPv4, leaving services wide open on IPv6. See why it happens on a VPS and how to close the gap.
On Ubuntu 24.04 a plain apt install enables SSH bans. Check detection with fail2ban-client, verify firewall rules, and fix Total failed stuck at 0.
Restic sends encrypted, deduplicated backups from your VPS to another server or object storage, on a nightly timer, with a restore drill that proves it.
Install Zabbix 7.0 LTS on Ubuntu 24.04: add the repo, import the MySQL schema, wire up the nginx frontend and agent2, then fix every error the setup throws.
Register a GitHub Actions runner on Ubuntu 24.04: dedicated user, checksum, config.sh, a systemd service, and the fork pull request security risk.
UFW is the simple way to run a firewall on a VPS. Set a default deny policy, allow only the ports you need, and turn it on without locking out SSH.
A systemd service keeps your program running: start on boot, restart on crash, log to the journal. How to write one, add a timer, and harden it.
Ubuntu Server 24.04 ships unattended-upgrades, but 20auto-upgrades turns it on. Automatic-Reboot stays false, and a dry run shows what it would install.
How SSH keys work and how to manage them: one ed25519 key per device, the permissions sshd demands, config Host blocks, and revoking a lost key.