fix(ssh): keep the key exchange off DH group16
driver / lint (pull_request) Successful in 14s
driver / standard (pull_request) Successful in 19s
driver / types (pull_request) Successful in 1m9s
driver / test (3.13) (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Successful in 1m7s
driver / lowest (pull_request) Successful in 28s
driver / build (pull_request) Successful in 33s
driver / security (pull_request) Successful in 1m8s
CI / driver (pull_request) Successful in 2m25s
driver / publish (pull_request) Skipped

The switch offers diffie-hellman-group14-sha256 and group16-sha512 only,
and paramiko picks group16. On an SG2210P with firmware 5.30 that 4096-bit
exchange takes 9 to 16 seconds, against netmiko's 10-second conn_timeout:
paramiko then tries to log in on a transport whose key exchange has not
finished and fails with "No existing session", so every other poll failed
and netOrk flapped the switch between online and offline. group14 takes
1.5 seconds.

group16 is now disabled by default; a disabled_algorithms passed in
optional_args still wins. The netmiko arguments move into _ssh.py, so
tplink_jetstream.py keeps its recorded length.
This commit is contained in:
Christian Manivong committed 2026-10-30 09:17:48 +01:00
1 parent d7e9caa0f3
commit d14c11e991
4 files changed
+56 -4

No files matched your search

+7
View File
@@ -6,6 +6,13 @@ All notable changes to this driver. The format follows
## [Unreleased]
### Fixed
- The SSH key exchange no longer uses `diffie-hellman-group16-sha512`. On an SG2210P
with firmware 5.30 its 4096-bit exchange took 9 to 16 seconds, against netmiko's
10-second `conn_timeout`, so every other connection failed and the switch flapped
between online and offline. `diffie-hellman-group14-sha256` takes 1.5 seconds. A
`disabled_algorithms` in `optional_args` still takes precedence.
### Changed
- Python 3.12 is the floor (`requires-python = ">=3.12"`): netOrk runs every driver
on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6).