How we measured attacks on a new VPS
Each new VPS was the smallest plan on its cloud, 1 vCPU and 1 GB of RAM, in Nuremberg (Hetzner) and Frankfurt (Vultr, Linode), with a stock Ubuntu 22.04 image, password login enabled and nothing installed. We never published the IP addresses anywhere.
We measured for one hour after boot: we read the sshd log (journalctl -u ssh) and captured every incoming TCP connection attempt with tcpdump. Our own logins from one known address were removed before counting. After the hour we destroyed all three servers. The whole test cost a few cents.
The capture on the Hetzner server started about 10 minutes late, after we reset its root password through the provider API, so its port numbers cover minutes 10 to 70. Its SSH log covers the full first hour.
# failed SSH logins since boot
journalctl -u ssh --no-pager | grep -E "Failed password|Invalid user"
# every incoming connection attempt (SYN without ACK), any interface
tcpdump -nn -i any -w syn.pcap "tcp[tcpflags] & (tcp-syn|tcp-ack) == tcp-syn"The first SSH password guess on a new VPS
The first failed login on each new VPS came within 8 minutes of boot. The table shows the time from boot to the first wrong password, and the totals for the first hour.
| Server (city) | First SSH guess after boot | Failed SSH logins, first hour | Different IPs guessing |
|---|---|---|---|
| Hetzner (Nuremberg) | about 4.5 min | about 75 | 15 |
| Vultr (Frankfurt) | about 5 min | about 15 | 3 |
| Linode (Frankfurt) | about 8 min | about 135 | 8 |
The spread between the three servers says more about each IP address than about the cloud. Cloud IPs are reused: the address you get was someone else's server last month, and scanners keep lists of addresses that once answered on port 22. A single server per cloud is far too small a sample to rank providers, and we would not read it that way.
What is consistent is the timing. Every new VPS got its first password guess in single-digit minutes, and the guessing never stopped for the rest of the hour.
Which usernames bots try first on a new VPS
Bots guessing SSH passwords on a new VPS try root far more than any other name. Across the three servers, root was about 4 in 10 of all failed logins, and the rest were generic service names.
| Username tried | Share of failed logins |
|---|---|
| root | about 4 in 10 |
| admin | about 1 in 8 |
| user, test, support, operator | about 1 in 10 together |
| ftpuser, hacluster, developer, guest, webmaster | a few each |
Those names tell you what the bots expect: a default root password or an account left behind by a control panel or an install script. A server that only accepts SSH keys turns every one of these attempts into a harmless log line.
Ports scanned on a new VPS besides SSH
Port 22 was the most probed port on every new VPS, but it was only a small part of the traffic. Each server received roughly 900 to 1,550 connection attempts in an hour, spread over 650 to 950 different ports. The table counts how many different IP addresses tried each port, summed over the three servers.
| Port | Service | Different IPs probing (3 servers) |
|---|---|---|
| 22 | SSH | about 60 |
| 23 | Telnet | about 35 |
| 443 | HTTPS | about 30 |
| 80 | HTTP | about 20 |
| 8080 | HTTP alternative | about 15 |
| 3389 | RDP (Windows remote desktop) | about 10 |
| 3000 | Node.js, Grafana dev servers | about 15 |
| 8443 | HTTPS alternative, panels | about 10 |
| 445 | SMB file sharing | about 7 |
| 3306 | MySQL | about 4 |
| 5900 | VNC | about 4 |
Telnet on port 23 being second is a reminder that a lot of this traffic hunts for routers and cameras, not servers. The ports that matter for a VPS are the ones people open by accident: 3000 and 8080 for an app started in development mode, 3306 for a database bound to all interfaces, 5900 for a VNC session left running.
RDP stood out on one server, with almost 300 attempts on port 3389 in the hour from a handful of addresses. If you run a Windows server, the same logic applies to RDP as to SSH on Linux: see how to secure RDP on a Windows VPS.
What to do in the first five minutes on a new VPS
The first five minutes on a new VPS matter because the first guesses arrive in about that time. The order below closes the doors the measurements show bots knocking on.
- Log in with a key and turn off password login. Add your public key, then set
PasswordAuthentication noandPermitRootLogin prohibit-passwordin/etc/ssh/sshd_config(sshd_config reference) and restart sshd. Every guess in the tables above then fails before it can succeed. Hardening SSH on a VPS walks through it. - Allow only the ports you use. With ufw:
ufw default deny incoming,ufw allow 22/tcp, plus 80 and 443 if you serve a website, thenufw enable. - Bind databases and dev servers to localhost. MySQL, PostgreSQL, Redis and app servers on 3000 or 8080 should listen on 127.0.0.1 unless something outside truly needs them.
- Install updates.
apt update && apt upgradebefore you install anything else.
Docker is the usual way people break step 2 by accident: a published container port goes around ufw. VPS security in layers covers that case and the rest of a basic setup.
# key-only SSH (run after your key works)
sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config
systemctl restart ssh