feat: ssh_host_keys.HostKeyCheck, trust on first use (NetOrk/netork#1167) #49

Merged
christianmanivong merged 1 commits from fix/ssh-host-key-tofu-1167 into main 2026-10-18 19:23:26 +00:00
Owner

Generic SSH host-key verification for every SSH driver: known key by port in, observation out, refused before authentication. Version 4.19.0. Part of NetOrk/netork#1167.

Generic SSH host-key verification for every SSH driver: known key by port in, observation out, refused before authentication. Version 4.19.0. Part of NetOrk/netork#1167.
christianmanivong added 1 commit 2026-10-18 19:23:26 +00:00
feat: ssh_host_keys.HostKeyCheck, trust on first use (NetOrk/netork#1167)
CI / test (3.10) (push) Successful in 35s
CI / test (3.11) (push) Successful in 41s
CI / test (3.12) (push) Successful in 38s
CI / test (3.13) (push) Successful in 33s
CI / test (3.10) (pull_request) Successful in 29s
CI / test (3.11) (pull_request) Successful in 28s
CI / test (3.12) (pull_request) Successful in 33s
CI / test (3.13) (pull_request) Successful in 40s
94bf399d34
Drivers get the host keys to expect in optional_args["ssh_host_keys"] (by port)
and report what they saw through optional_args["ssh_host_key_observer"].
With a known key, any other key is refused before authentication
(SshHostKeyMismatch); without one, the first key is accepted. One
implementation for paramiko (HostKeyCheck.connect) and netmiko
(HostKeyCheck.netmiko + observe). A caller or driver that ignores both keys
keeps working as before.

Version 4.19.0.
christianmanivong merged commit 888a11ca6a into main 2026-10-18 19:23:26 +00:00
christianmanivong deleted branch fix/ssh-host-key-tofu-1167 2026-10-18 19:23:26 +00:00
Sign in to join this conversation.