ssh = ssh_client.invoke_shell()
ssh.send('enable'+'\n')
time.sleep(1)
ssh.send('\n')
time.sleep(1)
ssh.send('show system warning'+'\n')
time.sleep(1)
output = ssh.recv(9999999).decode('utf-8',errors='strict')
print(output)
ssh_client.close()
代码是这样的 用crt查询的时候发现要先输入enable开启权限一样的东西 然后在代码里模拟实现不正常 发现在debug模式下是可以的
休眠一段时间后再send enable试下