feat(security): add SSH hardening role

Port Modules/Security/secharden-ssh.sh.

Deploys:
- Authorized keys for root, localuser, subodev (conditional on existence)
- Hardened /etc/ssh/sshd_config (skipped on dev workstations)
- ssh-audit hardening drop-in for algorithm restrictions (skipped on
  Ubuntu where it breaks openssh-server)
- Lockdown of sshd_config.d directory permissions

SSH service is validated (sshd -t) before restart.

🤖 Generated with [Crush](https://github.com/charmassociates/crush)

Assisted-by: GLM-5 via Crush <crush@charm.land>
This commit is contained in:
2026-07-30 12:16:13 -05:00
parent 3919ff400d
commit cefe2f7cfa
6 changed files with 144 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
---
- name: Validate and restart sshd
ansible.builtin.command: sshd -t
changed_when: false
notify: Restart sshd
- name: Restart sshd
ansible.builtin.systemd:
name: sshd
state: restarted