diff --git a/templates/sshd/sshd_config.j2 b/templates/sshd/sshd_config.j2 index eebd38c..bb2f33f 100644 --- a/templates/sshd/sshd_config.j2 +++ b/templates/sshd/sshd_config.j2 @@ -9,7 +9,7 @@ ListenAddress :: HostKey /etc/ssh/ssh_host_ed25519_key # Authentication -PermitRootLogin no +PermitRootLogin no # Hardening StrictModes yes @@ -40,4 +40,10 @@ Ciphers chacha20-poly1305@openssh.com,aes256-ctr MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com # sFTP +{% if ansible_facts['os_family'] == 'Debian' %} +Subsystem sftp /usr/lib/openssh/sftp-server +{% elif ansible_facts['os_family'] == 'Alpine' %} +Subsystem sftp /usr/lib/ssh/sftp-server +{% else %} Subsystem sftp /usr/libexec/sftp-server +{% endif %}