Document the notebook format and provide SSH-key, hardening-check, and package-install examples with inventory and credential exclusions.
1.5 KiB
1.5 KiB
title, params
| title | params | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Base hardening checks |
|
Base hardening checks
Read-only baseline for Debian servers. These checks report state; they do not change configuration. A failed check needs investigation, not an automatic fix. SSH configuration checks need passwordless sudo to read all included files.
. /etc/os-release
printf '%s\n' "$ID"
sshd -T | grep -Eq '^permitrootlogin (no|prohibit-password|without-password)$'
sshd -T | grep -qx 'passwordauthentication no'
sshd -T | grep -qx 'kbdinteractiveauthentication no'
nft list ruleset | grep -q 'hook input'
This confirms an input hook exists, not that the complete firewall policy is safe.
systemctl is-enabled unattended-upgrades.service
systemctl is-active unattended-upgrades.service
test "$(systemctl --failed --no-legend --plain | wc -l)" -eq 0