feat(ssh): say where the SSH algorithm lists are set
driver / lint (pull_request) Successful in 15s
driver / standard (pull_request) Successful in 18s
driver / types (pull_request) Successful in 1m13s
driver / test (3.13) (pull_request) Successful in 1m13s
driver / test (3.12) (pull_request) Successful in 1m15s
driver / lowest (pull_request) Successful in 40s
driver / build (pull_request) Successful in 37s
driver / security (pull_request) Successful in 1m6s
CI / driver (pull_request) Successful in 2m37s
driver / publish (pull_request) Skipped

OPNsense writes sshd_config from config.xml (<system><ssh>), set on the
legacy Administration page; no API controller reads or writes that
section (26.1, 26.7, master). The driver cannot harden the SSH server,
so it declares, as data, the page and the field of each algorithm list:
SSH_SETTINGS_MENU and SSH_SETTINGS_FIELDS, keyed like device-types'
SSH_ALGORITHM_CLASSES. An application tells a person what to set there.

The CARP master check moves to virtual_ips, next to the CARP reader, so
opnsense.py stays under its line ratchet.

Refs NetOrk/netork#1769
This commit is contained in:
Christian Manivong committed 2026-11-07 16:39:12 +01:00
1 parent 0289963af8
commit b50732c63c
7 files changed
+98 -10

No files matched your search

+13
View File
@@ -148,6 +148,19 @@ what OPNsense writes into the crontab beyond config.xml (`periodic`, the
plugins' system jobs) cannot be read over the API; the time zone is not read
(`None`).
### SSH server settings
OPNsense writes sshd_config from config.xml (`<system><ssh>`: `kex`, `ciphers`,
`macs`, `keys`, `keysig`), set on the legacy page *System → Settings →
Administration → Secure Shell* (`system_advanced_admin.php`). No API controller
reads or writes that section, up to OPNsense 26.7 and on `master`, so the driver
does not offer `harden_ssh_server`. It says, as data, where a person sets the
algorithm lists instead: `SSH_SETTINGS_MENU` is the page's menu path and
`SSH_SETTINGS_FIELDS` names each list's field by its algorithm class
(napalm-device-types' `SSH_ALGORITHM_CLASSES`). A field left empty means
OpenSSH's defaults. In an HA pair the configuration sync carries the section to
the backup when its "OpenSSH" item (`ssh`) is ticked.
## Config management
OPNsense does not expose a single generic "push config" endpoint. Config is