Free SSL on every plan • 24/7 expert support • 30-day money-back guarantee Contact UsKnowledge BaseBlogStatus Choose currency ₦NGN €EUR £GBP $USD

Securing a new server

1 min read · Updated 14 Nov 2026

A VPS is fully under your control, which also means keeping it secure is your responsibility.

1. Use SSH keys

Create a key pair on your computer (ssh-keygen -t ed25519), copy the public key to the server (ssh-copy-id root@your.server.ip), then turn off password sign-in by setting PasswordAuthentication no in /etc/ssh/sshd_config and restarting SSH.

2. Create a normal user

Sign in as a normal user with sudo rights instead of root, and set PermitRootLogin no once that works.

3. Turn on a firewall

Only allow the ports you need — for example SSH (22), HTTP (80) and HTTPS (443). Use ufw on Ubuntu or firewalld on AlmaLinux/Rocky.

4. Block repeated login attempts

Install fail2ban to ban addresses that keep guessing passwords.

5. Keep it updated

Install security updates regularly, or turn on automatic security updates.

6. Back it up

Take regular backups or snapshots and keep a copy elsewhere.

Was this article helpful?

We use cookies to keep this website working and, with your permission, to understand how visitors use it so we can improve it. You can accept, decline, or choose in Settings. Read more