From 2fe97d91db938ac70ee59a11d1eacc23f6697199 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Thu, 2 Nov 2023 21:40:13 +0800 Subject: [PATCH] Print error when login ssh server failed. --- core/remote_file.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/remote_file.py b/core/remote_file.py index 21c06831b1..14043d30c2 100755 --- a/core/remote_file.py +++ b/core/remote_file.py @@ -62,6 +62,8 @@ def connect_ssh(self): pub_key = self.ssh_pub_key() ssh.connect(self.ssh_host, port=self.ssh_port, username=self.ssh_user, key_filename=pub_key) except: + print(traceback.format_exc()) + # Try login server with password if public key is not available. password = RemoteFileClient.remote_password_dict[self.ssh_host] if self.ssh_host in RemoteFileClient.remote_password_dict else get_ssh_password(self.ssh_host) try: @@ -71,7 +73,7 @@ def connect_ssh(self): # Password only record in memory for session login, not save in file. RemoteFileClient.remote_password_dict[self.ssh_host] = password except: - pass + print(traceback.format_exc()) return ssh