Check fail2ban bans with `fail2ban-client status`

fail2ban runs silently for months — when you suddenly can't SSH in from your own IP, this is the command that tells you whether the jail banned you.

Linuxfail2bansshbrute-forcefirewallMedium risk
Run `sudo fail2ban-client status sshd` to see banned IP counts and the list of currently banned addresses in the SSH jail.

01Command

Command
$ sudo fail2ban-client status sshd

02What it does

`fail2ban-client status` alone lists all active jails; adding the jail name (usually sshd) shows its filter statistics plus the 'Banned IP list'. To release a wrongly banned address, run `sudo fail2ban-client set sshd unbanip 1.2.3.4`. Two more forgotten commands: `sudo fail2ban-client get sshd bantime` shows the configured ban duration, and `sudo fail2ban-client reload` applies config changes without losing the ban database.

03Risk

RiskMedium risk
RequirementsRequires fail2ban (apt install fail2ban) and an active jail; needs root
!Warning: Banning your own IP is easy: a mistyped password three times from your office NAT can lock out the whole network — check the list before assuming SSH is broken.

04Undo

Undo
$ sudo fail2ban-client set sshd unbanip <IP>

05Sources

Last verified: 2026-09-17 · Category: Security & Privacy