fix(ssh): verify the host key netOrk expects, report the one seen (NetOrk/netork#1167) #7

Merged
christianmanivong merged 1 commits from fix/ssh-host-key-tofu-1167 into main 2026-10-18 19:23:43 +00:00
1 Commits
Author SHA1 Message Date
Christian Manivong e4f57d3c3a fix(ssh): verify the host key netOrk expects, report the one seen (NetOrk/netork#1167)
Tests / Test (Python 3.10) (pull_request) Successful in 28s
Tests / Test (Python 3.11) (pull_request) Successful in 56s
Tests / Test (Python 3.12) (pull_request) Successful in 34s
The driver accepted any SSH host key. It now verifies through
napalm-device-types' HostKeyCheck (>= 4.19.0): with a known key in
optional_args["ssh_host_keys"] any other key is refused before login, and
every key seen is reported to optional_args["ssh_host_key_observer"].
Without either argument it connects as before (first use).
2026-10-18 21:23:42 +02:00