Skip to content

Basic server security for non-developers

You rented a server and put an agent on it. Now robots are probing it. Four things, in order, that handle most of the risk, and a prompt to do them.

By Nick

2 min read

VPS HostingPaste This Intermediate
On this page
Time
Twenty minutes
Cost
Nothing
Level
Intermediate

Before you start

1. The four, in order

Key, not password. Password login is how small servers get in trouble. The VPS page has the prompt that sets up a key; this step turns the password off once the key works.

Updates on their own. The server should install security updates without you. Set once, forget.

Firewall: deny by default. Block every port except the ones you use: SSH (remote login), and whatever your agent genuinely needs. Nothing else answers.

One job per server. Every extra thing running is another door. If it is not needed, it is not installed.

2. Let your agent do it, with a safety rope

Paste this into an agent on your own machine that can reach the server, as the Hermes guide set up. Keep a second SSH session open the whole time; if a change locks you out, that session is your way back.

Harden my server at [short name], safely, one step at a time, and wait for my yes before
each change. Keep my current SSH session working throughout.

1. Confirm key login works, then disable password login for SSH.
2. Turn on automatic security updates.
3. List what is currently listening on the network. Then set up a firewall that allows
   only SSH and the ports on that list that I confirm, and denies everything else.
4. List every service running and tell me which ones you think are unnecessary. Do not
   remove any without asking.

Never ask me for a password or a private key. After each step, tell me how to confirm it
worked from a fresh terminal, and how to undo it.

3. Test from a fresh window

New terminal, connect by the short name, no password asked. Then try a port you blocked and confirm it does not answer. That is the whole check.

How you know it worked. Login works with your key only, updates and the firewall are on, and you can read the list of what is running in one glance. Then set the spending cap, because a secure server with an unlimited API key is still an expensive one.

Common questions

Is a small personal server really a target?

Every server is. Not you personally; scripts scan every address on the internet looking for password logins and old software. Yours gets probed within minutes of existing, whether or not anyone knows it is yours.

Will the firewall break my agent?

Only if you block a port it needs, which is why the prompt asks it to list what is listening before it changes anything. Keep your SSH session open while you test.

What about backups?

Separate job, and the cheapest plans do not include them. If the server holds anything you would miss, turn on the host's backup option or copy the data folder off it weekly.

What to do next

Related reading

Last reviewed 9 October 2026 by Nick.

Software changes fast. If something here is out of date, tell me and I'll fix it.

Get new guides by email

Occasional and practical. No spam, no hype, unsubscribe whenever.

Occasional practical guides from UncomplicateAI. You will get a confirmation email before anything else is sent. Unsubscribe any time. Privacy

You are not subscribed until you confirm the email. Unsubscribe any time.