From f2ffe85b610e9489df4d0f06c2f446f1e74603ae Mon Sep 17 00:00:00 2001 From: janware DevOps Date: Fri, 20 Mar 2026 08:14:59 +0000 Subject: [PATCH] lib.SSHClientInternal: No key_filename in connect() Remove the key_filename parameter from the call to Paramiko's connect(). It's user-dependent, and the current DevOps implementation relies on having a SSH_AUTH_SOCK in the environment, anyway. Signed-off-by: janware DevOps --- src/python/jw/pkg/lib/SSHClient.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/python/jw/pkg/lib/SSHClient.py b/src/python/jw/pkg/lib/SSHClient.py index 846c2e76..0a0f6256 100644 --- a/src/python/jw/pkg/lib/SSHClient.py +++ b/src/python/jw/pkg/lib/SSHClient.py @@ -106,9 +106,11 @@ class SSHClientInternal(SSHClient): # export import paramiko # type: ignore # error: Library stubs not installed for "paramiko" ret = paramiko.SSHClient() ret.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - path_to_key=os.path.join(os.environ['HOME'], '.ssh', 'id_rsa') try: - ret.connect(self.hostname, key_filename=path_to_key, allow_agent=True) + ret.connect( + hostname=self.hostname, + allow_agent=True + ) except Exception as e: log(ERR, f'Failed to connect to {self.hostname} with key file {path_to_key} ({str(e)})') raise