fix(get_config): use port 22 for SSH fallback — self.port is the REST API port

In API transport mode, self.port = 443 (HTTPS). All SSH attempts were
connecting to port 443 which speaks TLS, not SSH — hence 'banner exchange
timed out'. Fix: hardcode port 22 for the SSH config fallback.
This commit is contained in:
Christian Manivong
2026-06-29 15:37:02 +02:00
parent a7ecc6427c
commit 2bb84aca4f
+1 -1
View File
@@ -616,7 +616,7 @@ class ProcurveDriver(ConfigLifecycleMixin, SwitchDriver):
"-o", "BatchMode=no", "-o", "BatchMode=no",
"-o", "KexAlgorithms=+diffie-hellman-group1-sha1,diffie-hellman-group14-sha1", "-o", "KexAlgorithms=+diffie-hellman-group1-sha1,diffie-hellman-group14-sha1",
"-o", "HostKeyAlgorithms=+ssh-rsa", "-o", "HostKeyAlgorithms=+ssh-rsa",
"-p", str(self.port or 22), "-p", "22", # always SSH port — self.port is the REST API port (443)
f"{self.username}@{self.hostname}", f"{self.username}@{self.hostname}",
"show running-config", "show running-config",
] ]