PluginsAppsPricingConsultingAboutBlog (opens andrewbaker.ninja in a new tab)Help Get in touch
👁33views

← CloudScale Plugin Help/CloudScale Cyber and Devtools: Free WordPress Security, AI Penetration Testing & Developer Toolkit

SSH Brute-Force Monitor

Reads your server’s auth.log every 60 seconds to count SSH failed login attempts. When the count exceeds your threshold in a rolling window, it fires an instant alert via email and push notification. Works alongside fail2ban, this plugin detects and alerts; fail2ban does the blocking.

WordPress SSH brute force monitor reading auth.log with email and ntfy.sh push notifications
On a phone
WordPress SSH brute force monitor reading auth.log with email and ntfy.sh push notifications, as it appears on a mobile screen
The same panel at 390px, showing how it reflows. Cropped to the first screens.

🖥️ Know the Moment Your SSH Port Is Under Attack

A server with SSH port 22 open to the internet will be targeted by automated scanners within minutes of going online. Most sites never know they’re under attack because these attempts are silent unless you’re watching the auth log. The SSH monitor brings that visibility to your WordPress dashboard.

The monitor tails /var/log/auth.log via an AJAX poll every 60 seconds. It counts Failed password and Invalid user entries in a rolling time window. When the count exceeds your threshold, an alert fires to your configured email and ntfy.sh topic. Alerts are throttled to once per 5 minutes to prevent notification floods during sustained attacks.

Setup

  1. The monitor requires the web server user (www-data) to be able to read /var/log/auth.log. If the panel shows a warning, run: sudo usermod -a -G adm www-data && sudo systemctl restart php-fpm
  2. Set your alert threshold, default is 10 failures in 60 seconds. This is calibrated to avoid false positives from a user mistyping their password, while catching any automated scanner instantly.
  3. Save settings. The monitor polls automatically from then on.

Detection vs. Blocking: use fail2ban alongside this

The SSH Monitor detects attacks and alerts you. It does not block IPs. For automatic IP blocking, use fail2ban. On Home, Stop SSH password guessing opens a script you run on the server. It installs fail2ban, exempts your own address, and comes with a rollback and a check. It also adds a small job on the server that sends failed SSH logins to the site each minute, so they show on the Attack Origins map as pink circles. The SSH panel lists the usernames tried and warns when one is a real account, so you can change it. The site keeps country and username totals only, and needs the DB-IP file to place addresses on the map.

With those settings, an address is banned for 6 hours after 5 failed SSH logins in 10 minutes. The CloudScale monitor shows you when attacks are happening at a volume that exceeds even fail2ban’s tolerance, a sign that you’re under a sustained, distributed attack that warrants additional action (firewall rules, port change, or contacting your hosting provider).

← Back to all sections