try:
print(cmd)
stdin, stdout, stderr = client.exec_command(cmd,timeout = 30)
print("hello")
if stdout.channel.recv_exit_status() != 0:
print("Command Failed")
return "Failed", stderr
else:
print("Command Passed")
return "Success",stdout
except Exception as e:
print(e)
return 'Failed','command failed'
这挂在stdout.channel.recv_exit_status()!= 0状态? 传递的命令不会在ssh机器上终止。 有解决办法吗?