ssh = paramiko.SSHClient() # 创建ssh对象
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(hostname=ip, port=int(port), username=username, password=password, )
stdin, stdout, stderr = ssh.exec_command(cmd, timeout=10)
result = stdout.read()
result1 = result.decode()
error = stderr.read().decode('utf-8')