From 98c0eb40fd9421b6d5364f79d57e575ddc45ad0b Mon Sep 17 00:00:00 2001 From: Ryan Bunney Date: Mon, 25 Nov 2024 15:45:58 +0800 Subject: [PATCH] LIU-427: Use key_filename rather than assume key is RSA. --- daliuge-engine/dlg/remote.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/daliuge-engine/dlg/remote.py b/daliuge-engine/dlg/remote.py index f39fcda1e..71cb103d9 100644 --- a/daliuge-engine/dlg/remote.py +++ b/daliuge-engine/dlg/remote.py @@ -103,10 +103,7 @@ def createClient(host, username=None, pkeyPath=None): client = SSHClient() client.set_missing_host_key_policy(AutoAddPolicy()) - pkey = ( - RSAKey.from_private_key_file(os.path.expanduser(pkeyPath)) if pkeyPath else None - ) - client.connect(host, username=username, pkey=pkey) + client.connect(host, username=username, key_filename=pkeyPath) return client