
On this page
Within minutes of your VPS coming online, bots will start guessing its SSH password. Nobody is targeting you; they scan every IP address on the internet, all the time. This is a six-step checklist to finish before you install anything else. It takes about 15 minutes on Ubuntu (Rocky Linux is similar — use dnf and firewalld instead).
1. Update the system
Install every pending security patch first:
apt update && apt full-upgrade -y
reboot
Then turn on automatic security updates, so the server stays patched when you forget:
apt install -y unattended-upgrades
dpkg-reconfigure --priority=low unattended-upgrades
2. Create a user instead of working as root
Working as root all the time means one mistyped command can break the whole system. Create your own user and give it sudo:
adduser deploy
usermod -aG sudo deploy
3. Use SSH keys instead of passwords
An SSH key can’t be guessed the way a password can. On your own computer (not the VPS), create a key and copy it to the server:
ssh-keygen -t ed25519 -C "you@example.com"
ssh-copy-id deploy@YOUR_VPS_IP
Open a new terminal and run ssh deploy@YOUR_VPS_IP. If you get in without a password prompt, the key works.
4. Disable root and password logins over SSH
Once key login works, add a small config file:
sudo nano /etc/ssh/sshd_config.d/99-hardening.conf
with these two lines:
PermitRootLogin no
PasswordAuthentication no
and restart SSH:
sudo systemctl restart ssh
5. Turn on the firewall and open only what you use
The rule is deny everything, then allow what you need. On Ubuntu that’s ufw:
sudo ufw allow OpenSSH
sudo ufw allow 80,443/tcp # if this is a web server
sudo ufw enable
sudo ufw status
Always allow OpenSSH before ufw enable, or you will cut yourself off. DDoS traffic is already filtered at the network edge before it reaches the server; the on-server firewall decides which of your services are exposed at all.
6. Install Fail2ban
Fail2ban watches the logs and bans IPs that keep failing to log in. The defaults already protect SSH:
sudo apt install -y fail2ban
sudo systemctl enable --now fail2ban
sudo fail2ban-client status sshd
Don’t skip this: plan your backups
The most important step, and the one most often skipped. RAID storage covers a failed drive, but not a deleted file, a botched update or a compromise — and Sundae VPS does not take automatic backups for you. Set up off-server backups on day one, for example:
resticorborgpushing to object storage- A daily cron job that dumps your database and ships it elsewhere
- An actual test restore, at least once. A backup you have never restored is not a backup yet.
The checklist
- System updated, automatic security updates on
- A sudo user created
- SSH keys only; root and password login disabled
-
ufwenabled with only the ports you use - Fail2ban installed
- Off-server backups running, and a restore tested
With these six done, your server is already better protected than most machines on the internet. Now go install your web server, Docker or whatever you came here to run.
Frequently asked questions
Should I move SSH off port 22?
It isn't necessary. A different port cuts log noise from scanning bots, but what actually protects the server is key-based login with password authentication turned off.
What if a firewall mistake locks me out of SSH?
Open the Web Console (VNC) from the control panel. It reaches the server without going over the network, so you can fix the firewall rules or SSH settings from there.
Does the VPS come with backups?
Not at Sundae VPS — there are no automatic backups or snapshots. RAID protects against a failed drive, not against deleted files, so off-server backups are the customer's responsibility.