Commit 42fbefd0 authored by ibuler's avatar ibuler

[Update] 修改connection

parent 4081d6a9
...@@ -130,9 +130,9 @@ class SSHConnection: ...@@ -130,9 +130,9 @@ class SSHConnection:
password=gateway.password, password=gateway.password,
pkey=gateway.private_key_obj, pkey=gateway.private_key_obj,
timeout=config['SSH_TIMEOUT']) timeout=config['SSH_TIMEOUT'])
except(paramiko.AuthenticationException, except (paramiko.AuthenticationException,
paramiko.BadAuthenticationType, paramiko.BadAuthenticationType,
SSHException): SSHException, socket.error):
continue continue
sock = ssh.get_transport().open_channel( sock = ssh.get_transport().open_channel(
'direct-tcpip', (asset.ip, asset.port), ('127.0.0.1', 0) '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