This commit is contained in:
yumoqing 2025-01-20 18:12:52 +08:00
parent 8877ecf99e
commit 7d2c0a7a21

View File

@ -51,12 +51,14 @@ class SSHNode:
refconn = await refconn.connect_ssh(host, refconn = await refconn.connect_ssh(host,
username=username, username=username,
known_hosts=None, known_hosts=None,
keepalive_interval=60,
password=password, password=password,
port=port) port=port)
else: else:
refconn = await asyncssh.connect(host, refconn = await asyncssh.connect(host,
username=username, username=username,
known_hosts=None, known_hosts=None,
keepalive_interval=60,
password=password, password=password,
port=port) port=port)
self.jumper_conns.append(refconn) self.jumper_conns.append(refconn)
@ -70,12 +72,14 @@ class SSHNode:
username=username, username=username,
port=port, port=port,
password=password, password=password,
keepalive_interval=60,
known_hosts=None) known_hosts=None)
else: else:
self.conn = await asyncssh.connect(host, self.conn = await asyncssh.connect(host,
username=username, username=username,
password=password, password=password,
known_hosts=None, known_hosts=None,
keepalive_interval=60,
port=port) port=port)
def close(self): def close(self):