mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
Three classes of drift cleaned up across 85 .md files:
- Em-dashes: replaced ` — ` with the contextually correct separator
(colon for `term: explanation`, period to split clauses across
sentences/source lines, parentheses for asides, semicolon for
tight-linked continuations). Two intentional exceptions remain
in `docs/contributing/documentation.md` (the rule literal) and
inside a fenced ```sh block in `docs/contributing/actions/debugging/ci.md`.
- SPOT self-labels: rewrote "This is the SPOT for X" to describe
the subject directly ("This directory holds X" / "This file
describes X"). Cross-references to other artefacts' canonical
role remain unchanged.
- Heading-emoji position: moved leading-emoji headings (`# 🧩 Title`)
to trailing position (`# Title 🧩`) per the headline rule that
emojis MUST come after the title text.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.0 KiB
2.0 KiB
sshd
Description
This Ansible role configures the OpenSSH daemon (sshd) by deploying a templated sshd_config file. It applies secure, best-practice settings to harden remote access and reduce the risk of misconfiguration or lockout. Settings include disabling root login, enforcing public-key authentication, and setting appropriate logging levels.
Overview
- Renders
sshd_config.j2into/etc/ssh/sshd_configwith customizable options - Sets file ownership (
root:root) and permissions (0644) - Automatically reloads and restarts the SSH service via a systemd handler
- Uses a
run_once_sys_svc_sshdfact to ensure idempotent execution
Key variable: SYS_SVC_SSHD_PASSWORD_AUTHENTICATION (default: false) enables password authentication when explicitly required by controlled environments such as local E2E test targets.
Features
- Templated Configuration: Delivers a Jinja2-based
sshd_configwith variables for debug logging, PAM support, and password-auth overrides. - Security Defaults: Disables password authentication and root login; enforces public-key authentication; conditionally sets
LogLeveltoDEBUG3whenMODE_DEBUGis true. - Systemd Integration: Handles daemon reload and service restart seamlessly on configuration changes.
- Idempotency: Ensures tasks run only once per play by setting the
run_once_sys_svc_sshdfact.
Further Resources
- sshd_config manual
- Ansible Template Module
- Ansible handler best practices
- OpenSSH security recommendations
Credits
Developed and maintained by Kevin Veen-Birkenbach. Learn more at veen.world. Part of the Infinito.Nexus Project. Licensed under the Infinito.Nexus Community License (Non-Commercial).