Unverified Commit a518b9a7 authored by 老广's avatar 老广 Committed by GitHub

Merge pull request #64 from jumpserver/dev

[Update] 修改网关的bug
parents 8b5c3812 1df7614a
...@@ -101,7 +101,8 @@ class SSHConnection: ...@@ -101,7 +101,8 @@ class SSHConnection:
ssh = paramiko.SSHClient() ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
try: try:
ssh.connect(gateway.ip, username=gateway.username, ssh.connect(gateway.ip, port=gateway.port,
username=gateway.username,
password=gateway.password, password=gateway.password,
pkey=gateway.private_key_obj) pkey=gateway.private_key_obj)
except(paramiko.AuthenticationException, except(paramiko.AuthenticationException,
......
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