Set-OPS-Public/roles/ssh_hardening/templates/20-setops-hardening.conf.j2
Daniel Allaire 9feaf212c7 reconstruction complete sans echec, et correction : ssh_hardening declarait deja
Deuxieme reconstruction from-zero : zero echec, zero injoignable sur les 14
hotes, d'un seul trait — creation, amorcage du socle, trente couches. La
premiere avait demande six corrections. Les cinq devis : CONFORME.

D-71 se lit dans les chiffres : infra-pki-01 changed=3, infra-dns-01
changed=1, deja montes par _amorcer-socle.

CORRECTION. J'ai ecrit hier que MaxStartups/MaxSessions « ne viennent d'aucun
role, elles sont dans le gabarit ». C'est FAUX : j'avais grepe ssh_baseline
seul. ssh_hardening les pose depuis toujours, en dur dans son template. Le
depot declarait bien son durcissement ; ce qu'il ne faisait pas, c'est
l'exposer — des valeurs ecrites dans un fichier de rendu sont invisibles a qui
lit les defaults.

Et ma premiere correction avait EMPIRE les choses : ajouter ces cles a
ssh_baseline creait deux fichiers, deux roles, une meme directive et deux
valeurs. Retire. Elles sont maintenant des variables de ssh_hardening.

Mesure finale sur les 14 : logingracetime 20, maxsessions 10, maxstartups
10:30:60 — identique partout.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 13:45:24 -04:00

27 lines
910 B
Django/Jinja

# Managed by Ansible — Set-OPS
Port {{ ssh_hardening_port }}
PermitRootLogin {{ ssh_hardening_permit_root_login }}
PubkeyAuthentication {{ ssh_hardening_pubkey_authentication }}
PasswordAuthentication {{ ssh_hardening_password_authentication }}
AuthenticationMethods publickey
KbdInteractiveAuthentication no
ChallengeResponseAuthentication no
PermitEmptyPasswords no
HostbasedAuthentication no
IgnoreRhosts yes
X11Forwarding no
AllowTcpForwarding no
AllowAgentForwarding no
AllowStreamLocalForwarding no
PermitTunnel no
GatewayPorts no
PermitUserEnvironment no
PermitTTY yes
TCPKeepAlive no
ClientAliveInterval {{ ssh_hardening_client_alive_interval }}
ClientAliveCountMax {{ ssh_hardening_client_alive_count_max }}
MaxAuthTries {{ ssh_hardening_max_auth_tries }}
LoginGraceTime {{ ssh_hardening_login_grace_time }}
MaxSessions {{ ssh_hardening_max_sessions }}
MaxStartups {{ ssh_hardening_max_startups }}