diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-12-05 19:58:05 +0000 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-12-05 21:03:22 +0000 |
commit | 4e542a8e15596421a9120cf700f0d4d12dbf6688 (patch) | |
tree | b7cd1c2c87acd27760110bf3b9534d7f159f0a7d /roles/sshd/templates | |
parent | 1f21f49f197d6f189952f6e7b1a0a21ebb86487b (diff) | |
download | rules-4e542a8e15596421a9120cf700f0d4d12dbf6688.tar.gz |
roles: Add sshd role for configuration generation
Diffstat (limited to 'roles/sshd/templates')
-rw-r--r-- | roles/sshd/templates/sshd_config.j2 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/roles/sshd/templates/sshd_config.j2 b/roles/sshd/templates/sshd_config.j2 new file mode 100644 index 0000000..534ea39 --- /dev/null +++ b/roles/sshd/templates/sshd_config.j2 @@ -0,0 +1,22 @@ +# managed by Ansible + +# security +PermitRootLogin yes +MaxAuthTries 6 +MaxSessions 10 + +# auth +AuthorizedKeysFile .ssh/authorized_keys +PasswordAuthentication no +PermitEmptyPasswords no +ClientAliveInterval 180 + +{% if ansible_facts["os_family"] == "Debian" %} +Subsystem sftp /usr/lib/openssh/sftp-server +ChallengeResponseAuthentication no +UsePAM yes +PrintMotd no +UsePrivilegeSeparation sandbox +{% else %} +Subsystem sftp /usr/libexec/sftp-server +{% endif %} |