"""Where the firewall's SSH server takes its algorithm lists from (NetOrk/netork#1769). OPNsense writes sshd_config itself, from config.xml (````: ``kex``, ``ciphers``, ``macs``, ``keys`` and ``keysig``, comma-separated), whenever the service is configured (``openssh_configure_do`` in ``plugins.inc.d/openssh.inc``). The section is set on the legacy page ``system_advanced_admin.php``; no API controller reads or writes it, up to 26.7 and on ``master``. So this driver cannot take algorithms out of what sshd offers -- it does not offer ``harden_ssh_server`` -- and says, as data, where a person sets the lists instead. A field left empty is OpenSSH's defaults. In an HA pair the configuration sync carries the section to the backup when its "OpenSSH" item is ticked (sync id ``ssh``, :data:`napalm_opnsense.ha.SYNC_ITEM_SERVICES`). """ from __future__ import annotations class OPNsenseSshSettingsMixin: """The page and fields that set the SSH server's algorithm lists, as the web interface names them.""" #: The menu path to the page, ending in the section that holds the lists. SSH_SETTINGS_MENU: tuple[str, ...] = ("System", "Settings", "Administration", "Secure Shell") #: Each list's field, by its algorithm class (napalm-device-types' #: ``SSH_ALGORITHM_CLASSES``). SSH_SETTINGS_FIELDS: dict[str, str] = { "kex": "Key exchange algorithms", "cipher": "Ciphers", "mac": "MACs", "hostkey": "Host key algorithms", }