5 Essential Tips for Securing Your New VPS
By Wangari Mwangi on October 8, 2023

Take Control of Your Server Security
Deploying a new VPS is exciting, but before you install your applications, it's vital to lock down its security. Here are the five most important steps every server admin should take.
1. Use SSH Keys for Authentication
Passwords can be cracked. SSH keys are a much more secure method for logging into your server. They consist of a public and private key pair. The public key is placed on the server, while you keep the private key secure on your own computer. This makes it nearly impossible for an attacker to brute-force their way in.
2. Configure a Firewall
A firewall is your server's first line of defense. It controls what traffic is allowed to enter and leave your server. Using a tool like UFW (Uncomplicated Firewall) on Ubuntu, you should block all ports by default and only open the ones you absolutely need (like SSH, HTTP, and HTTPS).
3. Keep Your System Updated
Software vulnerabilities are discovered all the time. The single most effective thing you can do to protect your server is to regularly update its packages. Run apt update && apt upgrade on a weekly basis to apply the latest security patches.
4. Disable Root Login
Logging in directly as the `root` user is risky. Instead, you should create a separate user account with `sudo` privileges. Once that's set up, you can disable direct SSH login for the `root` user, forcing all administrative actions to be taken through a user account, which provides better auditing.
5. Set Up Automated Backups
Even with the best security, things can go wrong. A reliable backup is your ultimate safety net. Whether you use our on-demand snapshots or our fully-managed Secure Backup service, ensure you have a recent, automated backup of your critical data.



