Skip to main content
Incident Response·2 min read(209 words)·Published 2026-08-14

Triage and Containment of SSH Brute Force Attacks from Linux Logs

Practical techniques for parsing /var/log/auth.log, aggregating attacking subnets, and verifying whether key-only policies prevented breach.

4 core sections·Technical reading pace: ~200 WPM·Covers lab SOC-019

1. Structure of Linux Authentication Logs

On Debian and Ubuntu systems, authentication activity is captured in /var/log/auth.log (or accessed via journalctl -u ssh.service). On RHEL and CentOS, it is stored in /var/log/secure.

Each entry records the timestamp, hostname, daemon name, PID, status (Failed/Accepted), target username, source IP, and source port.

2. Rapid Command-Line Parsing for Triage

When alerted to high connection failure rates, an analyst should immediately isolate the attacking IP addresses and the usernames targeted.

One-liner to aggregate top attacking IPs
grep "Failed password" /var/log/auth.log | awk '{print $(NF-3)}' | sort | uniq -c | sort -nr | head -n 10

3. How to Prove No Breach Occurred

Management and stakeholders need to know: did they get in? To answer this definitively, search for successful logons from the attacking IP addresses.

Verify absence of successful sessions
grep "Accepted" /var/log/auth.log | grep -E "198.51.100.42|198.51.100.89"

4. Hardening Strategies Beyond Password Disabling

Disabling password authentication (PasswordAuthentication no) in /etc/ssh/sshd_config is step one. To reduce log noise and scanning overhead, place SSH behind an IP allowlist, a WireGuard VPN tunnel, or change the default listening port.

References & Further Reading

Connected Practical Work

GuideIncident Response
How to Backup Data on Windows 11: A Step-by-Step Guide
Learn how to backup data on Windows 11 using built-in tools, external drives, and isolation practices to defend against hardware failure and ransomware.
Read more
GuideGRC
7 Steps for GDPR Data Breach Response: A Tactical Plan
Execute a compliant GDPR data breach response with this 7-step guide covering containment, risk assessment, supervisory notification, and internal logging.
Read more
GuideSmall Business Security
10 Small Business Cybersecurity Tips to Reduce Risk Fast
Protect your company with ten practical small business cybersecurity tips. Implement MFA, patch software, secure Wi-Fi, and build backups that work.
Read more
GuideIncident Response
The Binance Hack Timeline: How a 93-Cent Transaction Drained $6.3 Billion
A minute-by-minute account of the October 2026 Binance hack: the EIP-7702 sweep, the freeze race, the "one laptop" explanation, the North Korea attribution and where the money is now.
Read more
ReviewSoftware & Services
1Password Review: Enterprise Security and Practical Usability
An independent analysis of 1Password features, dual-key architecture, subscription costs, and platform support for personal and organizational use.
Read more
News2026-11-11
Cybersecurity News Briefing: November 11, 2026
Today’s briefing highlights a surge in high‑impact exploits and supply‑chain breaches. Microsoft’s November Patch Tuesday delivers updates for 1,235 flaws, including a zero‑day in Outlook that demands immediate installation. Parallel incidents involve remote‑code execution in SGLang, authentication bypasses in AhsayCBS, and phishing campaigns delivering RATs across Latin America. State‑linked groups continue targeting government Exchange servers and critical infrastructure. Prioritize applying Microsoft’s patches without delay.
Read more