Commit 42fbefd0 authored by ibuler's avatar ibuler

[Update] 修改connection

parent 4081d6a9
......@@ -130,9 +130,9 @@ class SSHConnection:
password=gateway.password,
pkey=gateway.private_key_obj,
timeout=config['SSH_TIMEOUT'])
except(paramiko.AuthenticationException,
paramiko.BadAuthenticationType,
SSHException):
except (paramiko.AuthenticationException,
paramiko.BadAuthenticationType,
SSHException, socket.error):
continue
sock = ssh.get_transport().open_channel(
'direct-tcpip', (asset.ip, asset.port), ('127.0.0.1', 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment