Commit 67bf0750 authored by ibuler's avatar ibuler

[Update] 修改选择gateway

parent 6dfb4cb0
......@@ -215,8 +215,9 @@ class SSHConnection:
)
if not domain.has_ssh_gateway():
return None
for i in domain.gateways:
gateway = domain.random_ssh_gateway()
for gateway in domain.gateways:
if gateway.protocol != "ssh":
continue
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
try:
......
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