Linux – SSH Lockout after failed login attempts

linuxpamsshUbuntu

I have an Ubuntu Server for my git repositories and other stuff. Sometimes someone trying to hack it (I think it's ok for servers) and after few failed login attempts SSH is locking out. I mean no one can do anything via SSH for 5 minutes or so. For example – "git pull" ends with "Connection timed out".

Since I'm not a Linux guy I can't figure out where I can change lockout time. I found this in the /etc/pam.d/login

auth optional pam_faildelay.so delay=3000000
But this only 3 seconds delay after single failed attempt.

I didn't find any mentions of "tally" in /etc/pam.d. What else could it be?

Best Answer

@Orphans helped me with this hint:

/etc/fail2ban/jail.conf and add the IP you want "whitelisted" under "ignoreip"

Related Topic