feat: open() waits out sshd's per-source penalty (NetOrk/netork#1800)
driver / lint (pull_request) Successful in 15s
driver / standard (pull_request) Failing after 15s
driver / types (pull_request) Successful in 1m3s
driver / test (3.13) (pull_request) Failing after 59s
driver / test (3.12) (pull_request) Failing after 1m9s
driver / lowest (pull_request) Failing after 28s
driver / build (pull_request) Successful in 29s
driver / security (pull_request) Successful in 1m2s
CI / driver (pull_request) Failing after 2m17s
driver / publish (pull_request) Skipped

OpenSSH 9.8+ closes every connection from a source it has just
penalised, before its banner, for seconds to minutes. open() now wraps
netmiko's ConnectHandler in napalm-device-types' retry_refused, so the
connection is tried again after 1, 3, 7 and 15 s instead of failing.
Needs NAPALM/napalm-device-types#63.
This commit is contained in:
Christian Manivong committed 2026-11-01 00:26:47 +01:00
1 parent 7550b884b0
commit 49b7d7fef7
3 files changed
+47 -10

No files matched your search

+5
View File
@@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- `open()` tries the connection again after 1, 3, 7 and 15 s when sshd closes it before
its banner -- what OpenSSH 9.8+ does to a source it has just penalised
(`PerSourcePenalties`), e.g. after a security scanner's probes. Needs
napalm-device-types' `retry_refused` (NAPALM/napalm-device-types#63,
NetOrk/netork#1800).
- The sudo password the old `_sudo` left in shell histories (NetOrk/netork#1090), through
napalm-device-types' `SudoHistoryMixin`. Until NetOrk/netork#1039 every privileged command
was typed into the interactive shell as `echo '<password>' | sudo -S -p "" …`, so the