How do I secure my VPS? Print

  • 0

Harden your server right after setup. The essentials:

  1. Update everything: run apt update && apt upgrade (Debian/Ubuntu) or dnf update (AlmaLinux/CentOS).
  2. Lock down SSH: use key authentication, then set PermitRootLogin no and disable password login in /etc/ssh/sshd_config.
  3. Enable a firewall: allow only the ports you need (see our firewall guide).
  4. Install Fail2ban to block brute-force attempts on SSH and other services.
  5. 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.


Was this answer helpful?

« Back