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模式下是可以的

paramiko ssh连接到负载均衡设备发送命令查询结果只有debug模式下成功
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-