roles/common: Limit number of SSH authentication attempts

The default in later OpenSSH is 6, which seems too high. If you can't
get your password correct after 3 tries then I think you need help.

Eventually I'd like an easy way to enable blocking of repeated login
attempts at the firewall level. I think it's possible in firewalld.
This commit is contained in:
Alan Orth 2018-07-23 13:12:53 +03:00
parent 4f6d02922a
commit 963bf65099
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
3 changed files with 3 additions and 2 deletions

View File

@ -32,7 +32,7 @@ LogLevel VERBOSE
#LoginGraceTime 2m
PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
MaxAuthTries 3
#MaxSessions 10
# Password based logins are disabled - only public key based logins are allowed.
AuthenticationMethods publickey

View File

@ -70,6 +70,7 @@ PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
MaxAuthTries 3
#MaxStartups 10:30:60
#Banner /etc/issue.net

View File

@ -31,7 +31,7 @@ LogLevel VERBOSE
#LoginGraceTime 2m
PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
MaxAuthTries 3
#MaxSessions 10
#PubkeyAuthentication yes