Harden your server right after setup. The essentials:
- Update everything: run
apt update && apt upgrade(Debian/Ubuntu) ordnf update(AlmaLinux/CentOS). - Lock down SSH: use key authentication, then set
PermitRootLogin noand disable password login in/etc/ssh/sshd_config. - Enable a firewall: allow only the ports you need (see our firewall guide).
- Install Fail2ban to block brute-force attempts on SSH and other services.
- Create a non-root sudo user for daily work.
Keep regular backups and remove software you don't use. On unmanaged VPS, security is entirely your responsibility. Managed customers get help from Toshost, so open a ticket if you'd like a hand.