我就废话不多说了,直接上代码吧!
import paramiko
from paramiko_expect import SSHClientInteraction
host = your host
port = your port
username = your un
# 自行修改输出函数
json_list = []
def output_func(msg):
sys.stdout.write(msg)
json_list.append(msg)
sys.stdout.flush()
def conn_tail(path):
try:
client = param