feat(ssh-server): say how sshd lets people log in, on FreeBSD and OpenBSD
driver / lint (pull_request) Successful in 12s
driver / standard (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m4s
driver / test (3.13) (pull_request) Successful in 1m5s
driver / test (3.12) (pull_request) Successful in 1m11s
driver / lowest (pull_request) Successful in 30s
driver / build (pull_request) Successful in 28s
driver / security (pull_request) Successful in 56s
CI / driver (pull_request) Successful in 2m16s
driver / publish (pull_request) Skipped

BsdDriver mixes in napalm-device-types' SshServerAuthMixin:
get_ssh_server_auth() reads sshd -T as root and, on FreeBSD, the modules of
sshd's PAM auth stack. The floor on napalm-device-types rises to 4.32.0, the
release that brings the mixin.

Refs NetOrk/netork#662
This commit is contained in:
Christian Manivong committed 2026-11-07 15:09:50 +01:00
1 parent 5070c249f8
commit a3964e845a
5 files changed
+72 -3

No files matched your search

+12 -2
View File
@@ -26,6 +26,7 @@ from napalm_device_types.channel import (
from napalm_device_types.host_status import HostStatusMixin
from napalm_device_types.models import FixStepOutcomeDict, SnmpAgentSettingsDict
from napalm_device_types.ssh_host_keys import HostKeyCheck, SshHostKeyMismatch
from napalm_device_types.ssh_server_auth import SshServerAuthMixin
from napalm_bsd import parse
from napalm_bsd.scheduled_jobs import BsdScheduledJobsMixin
@@ -89,9 +90,18 @@ def render_snmpd_conf(settings: SnmpAgentSettingsDict) -> str:
class BsdDriver(
BsdScheduledJobsMixin, SnmpAgentMixin, EnsurePackageMixin, HostStatusMixin, OSDriver
BsdScheduledJobsMixin,
SnmpAgentMixin,
EnsurePackageMixin,
HostStatusMixin,
SshServerAuthMixin,
OSDriver,
):
"""Base for the BSD drivers; a concrete one names the commands that differ."""
"""Base for the BSD drivers; a concrete one names the commands that differ.
``SshServerAuthMixin`` reads how sshd lets people log in (``sshd -T`` as root,
and sshd's PAM stack on FreeBSD); OpenBSD's sshd has no PAM.
"""
#: One role for FreeBSD and OpenBSD. It replaces OSDriver's "linux", which
#: would have the application treat a BSD host as a Linux one (#10).