Files
homelab/active
ducoterra bdee581480 add self-healing root SSH key systemd units
Headless Pis lose /root/.ssh/authorized_keys to imaging, first-boot tooling,
or config management, which locks out the only SSH account that can fix it.

- ensure-root-ssh-key: idempotent POSIX sh installer. Appends managed public
  keys from /usr/local/share/root-ssh-keys/authorized_keys, never removes or
  rewrites foreign keys, skips lines whose first field is not a known key
  algorithm, and enforces 0700 / 0600 root:root on the key dir and file.
- ensure-root-ssh-key.service: oneshot, ordered Before=ssh.service so the key
  lands before the daemon starts; ConditionPathExists skips it when the
  managed keys file is absent.
- ensure-root-ssh-key.path: PathChanged= + PathModified= on authorized_keys so
  deletes, renames, and in-place edits are healed at runtime, not just at boot.
  Writes only when a key is missing, so the unit settles after one no-op run.
- authorized_keys.example: template with commented placeholder keys only; the
  real file stays on the host.
- root-ssh-key.md: runbook with deploy, verification, revocation steps, and
  the gotcha that systemd has no PathMissing= key.

LLM-Generated: true
2026-10-16 09:05:54 -04:00
..
2026-09-07 11:37:56 -04:00
2026-05-05 06:26:40 -04:00
2026-05-05 06:26:40 -04:00
2026-05-05 06:26:40 -04:00
2026-05-05 06:26:40 -04:00
2026-02-25 12:16:30 -05:00
2026-09-07 11:37:56 -04:00
2026-09-07 11:37:56 -04:00
2026-09-07 11:37:56 -04:00
2026-09-07 11:37:56 -04:00
2026-09-07 11:37:56 -04:00
2026-02-25 12:18:44 -05:00
2026-09-07 11:37:56 -04:00
2026-02-25 12:19:06 -05:00
2025-10-14 12:30:55 -04:00
2026-05-05 06:26:40 -04:00
2025-10-14 12:31:05 -04:00
2026-09-07 11:37:56 -04:00
2026-09-07 11:37:56 -04:00
2026-03-16 09:53:54 -04:00
2026-09-07 11:37:56 -04:00
2026-05-05 06:26:40 -04:00
2026-05-05 06:26:40 -04:00
2026-05-05 06:26:40 -04:00
2026-04-16 13:11:17 -04:00
2026-05-05 06:26:40 -04:00
2026-05-05 06:26:40 -04:00
2026-05-05 06:26:40 -04:00
2025-07-22 18:29:07 -04:00
2025-07-22 18:29:07 -04:00
2026-02-06 20:13:33 -05:00
2026-02-06 20:13:55 -05:00
2026-09-07 11:37:56 -04:00
2026-02-06 20:20:56 -05:00
2026-05-05 06:26:40 -04:00
2026-02-06 20:21:33 -05:00
2025-10-14 12:36:29 -04:00
2026-02-06 20:21:55 -05:00
2025-11-13 16:51:02 -05:00
2026-05-05 06:26:40 -04:00
2026-05-05 06:26:40 -04:00
2026-09-07 11:37:56 -04:00
2026-05-05 06:26:40 -04:00
2026-02-06 20:22:58 -05:00
2026-09-07 11:37:56 -04:00
2026-09-07 11:37:56 -04:00
2026-09-07 11:37:56 -04:00
2026-02-06 20:24:24 -05:00
2025-10-23 10:40:56 -04:00
2026-02-06 20:27:19 -05:00
2026-02-06 20:27:27 -05:00
2026-09-07 11:37:56 -04:00
2026-05-05 06:26:40 -04:00
2025-10-14 12:36:56 -04:00
2026-05-05 06:26:40 -04:00
2026-05-05 06:26:40 -04:00
2026-09-07 11:37:56 -04:00