How to Detect Brute Force Attacks on SSH and Mitigate Them
Brute force attacks on SSH remain among the most persistent threats facing Australian organisations, because a single internet-facing port 22 lets an automated attacker test thousands of passwords against cloud and on-premises infrastructure. No exploit is required and little skill is needed. For teams in Sydney, Melbourne and Perth, exposure is amplified by hybrid estates: hosts in the AWS Sydney and Melbourne regions, Azure Australia East, racks in Perth, and legacy appliances still answering on the public internet.
Detection and mitigation only work together. You need to recognise a login storm in auth.log, journald and your SIEM before the hundredth failed attempt becomes one accepted password, then close the door before the next scan begins. The guide covers log signatures that separate opportunistic spraying from targeted intrusion, the network indicators worth alerting on, and the hardening steps — key-based authentication, restricted listeners, rate limiting and bastion access — that Australian teams can apply first.
Why attackers target Australian organisations
Credential reuse drives much of the traffic. Passwords leaked from Australian retail and e-commerce platforms end up in global credential lists replayed against SSH, VPN portals and webmail, and attackers know the usernames cloud defaults produce: admin, ubuntu, deploy, ec2-user and git.
Source addresses tell only part of the story. A burst from one IP can be a targeted campaign; a trickle across dozens of hosts suggests a botnet probing for any open door. Australian infrastructure is regularly abused as a launch pad, so a Sydney or Melbourne source is not automatically friendly.
The consequences are local. Unauthorised access is an offence under the Criminal Code Act 1995, critical infrastructure operators face close scrutiny after incidents affecting energy, water and transport, and the ACSC publishes joint advisories on brute force detection and response.
Recognising brute force traffic in SSH logs
Start with the authentication log. Debian and Ubuntu write to /var/log/auth.log, RHEL and AlmaLinux to /var/log/secure, and systemd hosts expose the same stream through journalctl -u sshd. Watch for "Failed password", "Invalid user" and "Did not receive identification string from"; a success reads "Accepted password" or "Accepted publickey".
Volume alone misleads. Failures across many usernames from many addresses point to a botnet sweeping for a foothold; one address hammering a single account points to brute force; one address cycling through many accounts, or many addresses hitting one account, points to password spraying or credential stuffing. Grouping by source IP, username and account status separates the patterns.
Pair logs with network telemetry. A rise in new connections to port 22, SYN floods against the listener, or outbound calls to unfamiliar addresses after a successful login change the picture. Ship logs off the host: an attacker who owns the machine can edit the file.
Detection signals and mitigation steps
The signals below belong in monitoring rules. Actions should be sequenced so the cheapest, highest-impact controls land first.
- Repeated authentication failures for one account from one source IP within a short window.
- Failures distributed across many usernames from a single source, the signature of credential stuffing.
- A successful password login on an account that minutes earlier was being hammered from elsewhere.
- New geographies, hosting providers or anonymising networks reaching admin accounts for the first time.
- Parallel sessions to port 22 from one host, indicating concurrent guessing tools.
Responding quickly matters, but durable mitigation removes the target rather than the symptom. These changes belong in every SSH baseline review:
- Disable password authentication and deploy FIDO2 or key-based logins with a documented rotation policy.
- Set PasswordAuthentication no, PermitRootLogin no, MaxAuthTries 3, and AllowUsers or AllowGroups on every host.
- Restrict port 22 to bastions, VPN ranges and CI runners, then close direct internet exposure in firewalls and cloud security groups.
- Deploy fail2ban, SSHguard or equivalent rate limiting, and route alerts into a 24/7 monitoring workflow.
- Replace static keys with short-lived SSH certificates, add MFA to the bastion, and patch OpenSSH on a defined cadence.
One caution: automated blocking can lock out legitimate engineers, especially in regional offices where staff connect over intermittent business fibre with 4G failover. Pair bans with a tested allow list and an out-of-band access path.
Hardening SSH across cloud and on-premises fleets
Hardening rarely fails on technique and usually fails on consistency. Cloud estates in Sydney and Melbourne drift within days of a good baseline, while suburban office appliances are updated quarterly at best. Inventory every listening SSH service and verify configuration with automated scans, because a fleet-wide PasswordAuthentication yes can survive unnoticed for years.
Move administration behind a bastion or PAM broker and issue short-lived certificates from an internal CA instead of distributing static keys. Segment management networks from production, and treat jump hosts as crown-jewel assets with MFA, session recording and strict patching. A quarterly attack surface scan or focused penetration test reveals forgotten hosts, default accounts and stale OpenSSH versions long before an attacker does.
Compliance and monitoring expectations in Australia
Australian frameworks turn SSH hygiene into testable obligations. The ASD Essential Eight expects privileged access to be controlled and limited. Australian financial institutions, from the major banks in Sydney and Melbourne to fast-growing fintechs, must satisfy APRA CPS 234, which requires regular testing against a risk-based standard. Healthcare operators, government departments and e-commerce platforms answer to further regulators.
Logs record employee activity too. SSH session data, source addresses and command history can reveal who did what, which engages the Privacy Act 1988 and the OAIC's Notifiable Data Breaches scheme. Guidance on monitoring without violating privacy is worth reading before rolling out session recording on Australian staff; keep retention bounded, restrict access to log data, and document why each alert was raised.
When something slips, evidence quality decides the outcome. Preserve original logs with timestamps in UTC and AEST, store them immutably, and follow ACSC reporting guidance through ReportCyber for significant incidents. Continuous SIEM monitoring and threat intelligence then turn a one-off intrusion into a pattern your team can act on.
Request an independent SSH exposure assessment
Infoziant Security assesses SSH and infrastructure exposure for Australian enterprises, government agencies, financial institutions, e-commerce operators and healthcare providers. A focused vulnerability assessment and penetration test confirms whether your detection rules fire, whether your baselines hold and how far an attacker could travel after one guessed password. You can request a free VAPT report to benchmark your external perimeter.
Trial-based engagements let your team review real findings, validate alert workflows and agree priorities before committing to a managed service, with 24/7 monitoring, SIEM oversight and threat intelligence covering cloud and on-premises estates. Book a scoping session, share your SSH estate details, and receive a prioritised remediation plan your board can act on.