fix(ssh): log in only with the credentials the driver is given

paramiko's look_for_keys and allow_agent stayed at their default True,
so the node login also tried every key in the running process's own
~/.ssh and any SSH agent it could reach. The driver standard lets a
driver authenticate only with what it was handed; both are now False
on every connect.

Closes #48
This commit is contained in:
Christian Manivong committed 2026-11-02 09:25:04 +01:00
1 parent b368ad9856
commit b3fe5009c8
3 files changed
+20 -1

No files matched your search

+4 -1
View File
@@ -337,10 +337,13 @@ class ProxmoxDriver(
import paramiko
if self._ssh_client is None:
# A key is tried first; paramiko falls back to the password.
# A key is tried first; paramiko falls back to the password. Only
# these: not the keys in the process's own ~/.ssh, nor an agent.
connect_kwargs: _JsonDict = {
"username": self._ssh_username or self.username,
"timeout": self.timeout,
"look_for_keys": False,
"allow_agent": False,
}
password = self._ssh_password or self.password
if password: