diff --git a/roles/common/templates/sshd_config_Debian-9.j2 b/roles/common/templates/sshd_config_Debian-9.j2 index c0485ed..698fb4e 100644 --- a/roles/common/templates/sshd_config_Debian-9.j2 +++ b/roles/common/templates/sshd_config_Debian-9.j2 @@ -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 diff --git a/roles/common/templates/sshd_config_Ubuntu-16.04.j2 b/roles/common/templates/sshd_config_Ubuntu-16.04.j2 index 9640d88..372d012 100644 --- a/roles/common/templates/sshd_config_Ubuntu-16.04.j2 +++ b/roles/common/templates/sshd_config_Ubuntu-16.04.j2 @@ -70,6 +70,7 @@ PrintLastLog yes TCPKeepAlive yes #UseLogin no +MaxAuthTries 3 #MaxStartups 10:30:60 #Banner /etc/issue.net diff --git a/roles/common/templates/sshd_config_Ubuntu-18.04.j2 b/roles/common/templates/sshd_config_Ubuntu-18.04.j2 index b5fa4c6..53eafd9 100644 --- a/roles/common/templates/sshd_config_Ubuntu-18.04.j2 +++ b/roles/common/templates/sshd_config_Ubuntu-18.04.j2 @@ -31,7 +31,7 @@ LogLevel VERBOSE #LoginGraceTime 2m PermitRootLogin prohibit-password #StrictModes yes -#MaxAuthTries 6 +MaxAuthTries 3 #MaxSessions 10 #PubkeyAuthentication yes