Offer the SSH hardening: the generated sshd_config includes sshd_config.d #20

Closed
opened 2026-11-03 06:56:07 +00:00 by christianmanivong · 0 comments
Owner

Prio: P3

#3 opted out of the inherited harden_ssh_server, because OMV regenerates sshd_config on the next apply of its SSH settings. Checked on OMV 8 (Debian 13): the template srv/salt/omv/deploy/ssh/files/sshd_config.j2 ends with Include /etc/ssh/sshd_config.d/*.conf, and the state 20sshd_config.sls manages only /etc/ssh/sshd_config, so a drop-in in sshd_config.d survives omv-salt deploy run ssh. The template sets no algorithm lists; one set in "Extra options" comes before the Include and wins, which the mixin already detects (sshd -T) and reverts.

Fix: drop harden_ssh_server = None, set SSHD_CONFIG_GENERATED = True (napalm-device-types 4.26.0), so the hardening goes into the drop-in only and never rewrites sshd_config.

Prio: P3 #3 opted out of the inherited `harden_ssh_server`, because OMV regenerates `sshd_config` on the next apply of its SSH settings. Checked on OMV 8 (Debian 13): the template `srv/salt/omv/deploy/ssh/files/sshd_config.j2` ends with `Include /etc/ssh/sshd_config.d/*.conf`, and the state `20sshd_config.sls` manages only `/etc/ssh/sshd_config`, so a drop-in in `sshd_config.d` survives `omv-salt deploy run ssh`. The template sets no algorithm lists; one set in "Extra options" comes before the Include and wins, which the mixin already detects (`sshd -T`) and reverts. Fix: drop `harden_ssh_server = None`, set `SSHD_CONFIG_GENERATED = True` (napalm-device-types 4.26.0), so the hardening goes into the drop-in only and never rewrites `sshd_config`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-openmediavault#20