OpenSshServerMixin: a platform that generates sshd_config but includes sshd_config.d should keep the hardening #88

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

Prio: P3

A platform such as OpenMediaVault writes /etc/ssh/sshd_config from its own database, so today it must opt out of harden_ssh_server entirely. OMV's generated file does include /etc/ssh/sshd_config.d/*.conf, though, and its salt state leaves that directory alone, so the drop-in path is safe there. Only the fallback that rewrites sshd_config itself (when there is no Include) would be undone on the platform's next apply.

Proposal: a class attribute SSHD_CONFIG_GENERATED (default False). When True, harden_ssh_server writes only the drop-in; a sshd_config without the Include is left untouched, and the result (applied=False) says why. exempt_from_ssh_penalties already writes only into the drop-in directory.

Context: NetOrk/netork (SSH algorithm fix refused on OpenMediaVault).

Prio: P3 A platform such as OpenMediaVault writes `/etc/ssh/sshd_config` from its own database, so today it must opt out of `harden_ssh_server` entirely. OMV's generated file does include `/etc/ssh/sshd_config.d/*.conf`, though, and its salt state leaves that directory alone, so the drop-in path is safe there. Only the fallback that rewrites `sshd_config` itself (when there is no Include) would be undone on the platform's next apply. Proposal: a class attribute `SSHD_CONFIG_GENERATED` (default False). When True, `harden_ssh_server` writes only the drop-in; a sshd_config without the Include is left untouched, and the result (`applied=False`) says why. `exempt_from_ssh_penalties` already writes only into the drop-in directory. Context: NetOrk/netork (SSH algorithm fix refused on OpenMediaVault).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-device-types#88