test fail2ban efficiency with fake log records

You can simulate failed SSH access attempts with logger:

logger -p authpriv.warning -t ‘sshd[12345]:’ ‘ pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=1.2.3.4 user=root’

Leave a Reply

Your email address will not be published. Required fields are marked *