attackradar.co.ukAll articlesHome

Why Is My Server Getting So Many SSH Login Attempts? What It Means and What to Do

Updated 16 November 2026

You set up a new server, check the logs a day later and find hundreds or thousands of failed login attempts. Usernames you have never created, such as root, admin, test and oracle, are being tried again and again from IP addresses all over the world.

It is one of the most common questions new server owners ask. Has someone targeted me? Am I already compromised? This guide explains what is going on, how much it matters and what you can do about it.

Why is this happening to my server?

The short answer is that it is not personal. Any machine with a public IP address and SSH listening on port 22 will be found by automated scanners, often within minutes of going live.

Attackers run software that sweeps through huge ranges of IP addresses, looking for open SSH ports. When one is found, the bot starts working through lists of common usernames and passwords. Many of these bots run on machines that have themselves been compromised, which is why the attempts come from so many different countries and networks.

It is a numbers game

Most of these bots do not know or care who you are. They try millions of servers because a small fraction will have a weak password, a default account or a forgotten test user. Your server is simply one address on a very long list.

What kinds of attack are you seeing?

Failed SSH logins usually fall into a few familiar patterns:

On most Linux systems you will find these attempts in /var/log/auth.log (Debian and Ubuntu) or /var/log/secure (Red Hat-based systems). The journalctl and lastb commands are also useful for a quick look.

How worried should you be?

A failed login is, by definition, an attack that did not work. The volume alone is not a sign that you have been breached. What matters is whether any of those attempts could ever succeed.

If you allow password logins, have a guessable password or leave the root account open to remote login, the steady stream of attempts is a real risk. If you use key-based authentication and have locked down the basics, the attempts are mostly noise. That said, noise still costs CPU time, fills your logs and can hide the one event that genuinely matters.

Practical steps to reduce the risk

You do not need to do everything at once, but each of these steps makes a meaningful difference:

  1. Use SSH keys and turn off password authentication. This single change defeats almost every brute force and dictionary attack.
  2. Disable direct root login. Log in as a normal user and escalate privileges when needed.
  3. Restrict who can log in. Use options such as AllowUsers or AllowGroups so only named accounts can connect.
  4. Block repeat offenders automatically. Tools such as fail2ban watch your logs and ban IPs after a set number of failures.
  5. Limit access at the firewall. If only a few known IP addresses need SSH, allow those and block everything else, or put SSH behind a VPN.
  6. Keep OpenSSH and your operating system updated. Patches close weaknesses that attackers actively look for.
  7. Keep watching. Review logs regularly so you notice changes in volume or behaviour.

Which measure does what?

MeasureWhat it doesLimitation
Key-only authenticationMakes password guessing pointlessKeys must be managed and protected
fail2banBans IPs after repeated failuresOnly reacts after attempts have started
Firewall allow-listHides SSH from almost everyoneHarder if your own IP changes often
Changing the SSH portCuts down log noise from basic scannersNot real security; determined scanners find it
Shared IP blacklistsBlocks known attackers before they reach youLists need regular updating to stay useful

Going further: learning from the attackers

Blocking attacks on your own server is reactive. Each IP has to fail several times before it is banned, and every new server has to learn the same lessons from scratch.

A more proactive approach is to study attackers in a controlled setting. A honeypot is a deliberately exposed service that exists only to attract and record malicious activity. Because no legitimate user should ever connect to it, every connection is useful intelligence: which IPs are active, which usernames and passwords they try, and where they come from.

That intelligence can then be turned into blacklists and shared across your infrastructure, so attackers seen in one place are blocked everywhere before they get a chance to try their luck.

The same pattern applies to mail servers. SMTP, IMAP and POP3 services see constant authentication attacks and credential stuffing, and they benefit from the same mix of hardening, monitoring and shared blocking.

How AttackRadar helps

AttackRadar is Transcom's attack intelligence platform, built to show you exactly this kind of activity and to act on it. Its live SSH Attack Intelligence demo shows real-time brute force detection, dictionary attack analysis, geographic threat correlation and automated blacklist distribution. At the time of writing it had recorded around 362,000 attacks from 1,821 IP addresses.

Key features include:

The Starter plan costs £499 per month and covers single server monitoring, SSH and mail honeypots, the real-time attack map, basic analytics, blacklist generation and API access. The Professional plan, at £1,499 per month, covers up to 10 servers and adds all attack vectors, multi-region honeypots and network topology mapping. Enterprise options are also available. There are no contracts, so you can cancel at any time.

See it for yourself

If your logs are full of failed logins and you want to understand who is behind them, and block them automatically, explore the live demos and plans on the AttackRadar homepage.