diff --git a/common/devkit_utils/transport_utils.py b/common/devkit_utils/transport_utils.py index e5a728994699440d4929795c4600103043902ba5..f16b61e78e3c4c44a906a7bfaee5988db526b1fe 100644 --- a/common/devkit_utils/transport_utils.py +++ b/common/devkit_utils/transport_utils.py @@ -51,6 +51,7 @@ class SSHClientFactory: raise TransportException("The passwordless configuration is incorrect") except Exception as ex: logging.exception(ex) + ssh.close() raise TransportException() return ssh @@ -171,4 +172,5 @@ Q0ktTVQBAgMEBQYH -----END OPENSSH PRIVATE KEY-----""") ssh_client = factory.create_ssh_client() stdin, stdout, stderr = ssh_client.exec_command("whoami") + ssh_client.close() print(stdout.read())