Packs / cybersecurity-public
sshd-config-audit
Audit an sshd_config for weak settings and get a pass/warn list with the fix for each
Install
logicpacks pack use cybersecurity-public/sshd-config-auditget_pack cybersecurity-public/sshd-config-auditThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
local-python - Checks: 2 in
outcome/checks.yaml - Code:
sshd_audit.py - Tools: python3
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
A read-only report on our own sshd_config: root login, password auth, empty passwords, X11 forwarding, MaxAuthTries, weak ciphers/MACs/KEX, each with the recommended value.
Verified by: A hardened fixture scores 0 findings; a weak fixture reports the 6 expected findings.
Steps
- Copy your server's /etc/ssh/sshd_config (or run on the server itself, read-only).
- Run
python3 code/sshd_audit.py /etc/ssh/sshd_config. - Apply fixes in a test session first; keep one root shell open while reloading sshd.
- Validate with
sshd -tbefore reload.
Edge cases
- Match blocks can override global values; findings inside Match are reported with the block name.
- Include directives are not followed; audit the included files too.
- Defaults apply when a keyword is absent (e.g. PermitRootLogin defaults to prohibit-password).
Don'ts
- Never point this at machines, hosts or networks we do not own or are not authorised to audit.
- Don't change settings automatically; report, then a human applies fixes.
- Don't disable password auth before a working key login is confirmed.