Root access on a VPS means the security of the box is your responsibility, not a shared, pre-hardened environment like Shared Hosting. None of this takes long, but doing it before you deploy anything saves a lot of trouble later.

1. Create a non-root user

Don't operate day-to-day as root. Create a user with sudo privileges instead:

adduser deploy
usermod -aG sudo deploy

Log out and back in as that user for everything that isn't system administration.

2. Switch to SSH key authentication

Password-based SSH logins are the most common thing automated scanners try to brute-force. Generate a key pair on your own machine, copy the public key to the server, then disable password logins entirely:

ssh-copy-id deploy@your-server-ip

Then edit /etc/ssh/sshd_config, set PasswordAuthentication no and PermitRootLogin no, and restart the SSH service.

3. Turn on the firewall

Every Byytes VPS ships with a configurable firewall you can manage from your account panel, or directly with ufw on the server:

ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable

Only open the ports your application actually needs. It's easier to add a port later than to figure out what's been exposed for months.

Changed your SSH port? If you've moved SSH off port 22, allow that specific port in the firewall before enabling it, or you'll lock yourself out.

4. Install fail2ban

Fail2ban watches log files for repeated failed login attempts and temporarily bans the offending IP address, a lightweight extra layer on top of key-only SSH access:

apt install fail2ban
systemctl enable --now fail2ban

5. Turn on automatic security updates

Security patches for your OS and installed packages don't apply themselves. On Ubuntu or Debian:

apt install unattended-upgrades
dpkg-reconfigure --priority=low unattended-upgrades

6. Set up backups before you need them

Every VPS plan includes weekly backups by default, visible under Backups in your account panel. If you're running something that changes often, consider enabling more frequent snapshots or scripting your own database dumps to a separate location.

7. Use the one-click app catalog when you can

For common stacks, Byytes' one-click catalog deploys pre-hardened images (LEMP, Docker, Node, and others) with sane defaults already applied, worth checking before building an environment from scratch.

StepWhy it matters
Non-root userLimits damage from a compromised process or mistake
SSH keys onlyEliminates brute-force password attacks
FirewallReduces what's reachable from the internet
fail2banAuto-blocks repeated intrusion attempts
Auto updatesCloses known vulnerabilities automatically

Want a managed VPS instead?

Add managed support to any VPS tier and we'll handle hardening, patching, and monitoring for you.

Get your quote