Files
computer-playbook/roles/sys-svc-sshd/templates/sshd_config.j2
kevinveenbirkenbachandClaude Fable 5 577185035c fix(sshd): stop trim_blocks glueing LogLevel to the next line
Ansible renders templates with trim_blocks, so the newline after the
inline {% endif %} was swallowed and the config shipped
'LogLevel INFO# Authentication:'; sshd -t rejects that line and every
restart left the host without ssh (the swarm test caught it because the
backup node pulls over ssh right after the rollout). Inline expression
instead of block tags, and the commented upstream example defaults are
gone; the rendered directives are unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 09:41:06 +02:00

16 lines
490 B
Django/Jinja

LogLevel {{ 'DEBUG3' if MODE_DEBUG | bool else 'INFO' }}
PermitRootLogin no
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication {{ (SYS_SVC_SSHD_PASSWORD_AUTHENTICATION | bool) | ternary('yes', 'no') }}
ChallengeResponseAuthentication no
GSSAPIAuthentication no
UsePAM yes
PrintMotd no
UseDNS no
{% if ansible_facts['os_family'] == "Archlinux" %}
Subsystem sftp /usr/lib/ssh/sftp-server
{% else %}
Subsystem sftp /usr/lib/openssh/sftp-server
{% endif %}