From 4e542a8e15596421a9120cf700f0d4d12dbf6688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sun, 5 Dec 2021 19:58:05 +0000 Subject: roles: Add sshd role for configuration generation --- roles/sshd/templates/sshd_config.j2 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 roles/sshd/templates/sshd_config.j2 (limited to 'roles/sshd/templates/sshd_config.j2') 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 %} -- cgit v1.2.3