๐Ÿ”’ Linux ยท Python 3.10+ ยท MIT

Turn SSH into a fortress.

A production-ready SSH security framework that hardens your daemon, bans brute-force attackers before they exhaust their attempts, and streams every event to your SIEM โ€” the work of three or four separate tools, in one.

$ git clone https://github.com/mobinert/ssh-fortress
CIS Level 2 / NSA hardening nftables kernel-level bans 37 tests passing Zero-lock-out safety

What it does

๐Ÿ›ก๏ธ

Hardens your daemon

Brings sshd up to CIS Level 2 / NSA standards automatically โ€” and validates the config before you rely on it.

๐Ÿšซ

Adaptive brute-force bans

A behavioural threat engine scores every source IP and bans at the kernel with nftables, before attackers exhaust auth attempts.

๐Ÿ“ก

SIEM integration

Forwards every SSH event to Elasticsearch, Splunk, Syslog or Kafka with async, back-pressured delivery.

๐Ÿ””

Instant alerts

Notifies you on Telegram, Email, Discord, Slack or ntfy the moment something looks wrong.

๐Ÿ“Š

Prometheus metrics

Exposes metrics for Grafana and Alertmanager, so SSH health lives right next to the rest of your stack.

๐Ÿงญ

Anomaly detection

Flags impossible travel, IP sprays, unusual login hours and root attempts โ€” not just raw failure counts.

๐Ÿ”‘

SSH key auditing

Finds weak, old or duplicate authorized keys before an attacker does.

๐ŸŒ

Threat-intel pre-bans

Checks incoming IPs against AbuseIPDB and pre-bans known attackers on sight.

๐Ÿฉบ

Doctor & reports

A doctor command validates everything, and designed HTML / JSON security reports summarize your posture on demand.

Quick start

git clone https://github.com/mobinert/ssh-fortress.git
cd ssh-fortress
pip install -r requirements.txt

sudo ssh-fortress doctor      # validate your setup first
sudo ssh-fortress harden      # apply CIS/NSA hardening (with a safety net)
sudo ssh-fortress watch       # start adaptive brute-force protection

Near-zero overhead: inotify-driven log tailing uses no CPU when idle, ban decisions are O(1), and the systemd unit is capped at 20% CPU / 256 MB RAM.