Don't trust the config: 6 tests that prove your self-hosted AI agent server is locked down A developer who hardens personal AI agents on VPSes published a six-test checklist for verifying that self-hosted agent servers are actually locked down, arguing that config files can claim one thing while the machine does another. The tests cover external port scanning and loopback-only listening, querying sshd directly for password and root login settings, confirming fail2ban bans after deliberate failed logins, killing the agent's systemd user service to verify auto-restart and lingering, triggering alerts to prove delivery, and checking API-key spend limits since neither OpenClaw nor Hermes ships a hard spend cap. The author reports restart times of 6–7 seconds for the process and 22–42 seconds to first Telegram reply, fail2ban bans landing after 7 and 127 seconds on test VMs, and rollbacks taking 1–3.5 minutes. Disclosure: I wrote this with AI assistance and checked every command and number against my own test runs. A personal AI agent on a VPS OpenClaw, Hermes tends to get "secured" by reading config files. The config says one thing; the machine does another. Here are six tests I run that check behavior, not settings. Each takes a few minutes. Replace AGENT UNIT , YOUR IP and USER with yours. ufw status From another machine, not the server itself and not localhost: nmap -Pn -p- -sS YOUR IP nmap -Pn -sU --top-ports 100 YOUR IP Expected: only 22/tcp open. Run it after the agent is started, since the agent's own ports are open by then. If you see the agent gateway port or a dashboard, fix that before anything else. On the server, also check that the agent listens on loopback only: sudo ss -tulnp Everything except sshd should be on loopback: 127.0.0.1 or ::1 for the agent OpenClaw's gateway is on 18789 . Two harmless system entries show up on any Ubuntu: the DNS resolver on 127.0.0.53 / 127.0.0.54 and the DHCP client on udp/68 . Open the panel through a tunnel: ssh -N -L PORT:127.0.0.1:PORT USER@YOUR IP . grep /etc/ssh/sshd config misses drop-ins cloud images often ship one in sshd config.d/ that re-enables password login . Ask the daemon: sudo sshd -T | grep -Ei 'passwordauthentication|kbdinteractiveauthentication|permitrootlogin' Expected: no , no , no . Then test it from outside: ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no USER@YOUR IP You should get Permission denied without a password prompt. systemctl is-active fail2ban proves a process exists. From a second host, fail a few SSH logins on purpose, then on the server: sudo fail2ban-client status sshd The attacker IP should appear under banned. On my test VMs the ban came after 7 and 127 seconds, depending on timing of retries. Unban yourself afterwards: sudo fail2ban-client set sshd unbanip IP . Agents usually run as a user service, so ask the user's systemd, not the system one the system one will happily print MainPID=0 : sudo systemctl --user -M USER@ show AGENT UNIT -p MainPID -p Restart sudo kill -9