Executing command using Paramiko on Brocade switch

大憨熊 提交于 2019-12-01 07:55:47

The "exec" channel on Brocade SSH server seems to be implemented to support the scp command only. So you cannot use your code with the SSHClient.exec_command.

As you claim to be able to "SSH" to the switch, it seems that the "shell" channel is fully working.

You should be able to use the SSHClient.invoke_shell and write the commands to the channel (= to the shell) using the Channel.send.

channel = ssh.invoke_shell()
channel.send('ls\n')
channel.send('exit\n')
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!