Hello! I am trying to run commands against a Cisco network device in series using something like this
withasyncssh.connect(MY_HOST) asconn:
cmds= ['show version', 'show arp']
forcmdincmds:
out=awaitconn.run(cmd)
print(out.stdout)
But when I run it, the channel seems to be closed after the first command finishes.
'Proper version info here........'
ChannelOpenError('')
Am I missing something painfully obvious or do you think it's something to do with the network device? For what it's worth, I don't see this issue when using paramiko though that doesn't get me the async capabilities. Curiously, I can get it to work using scrapli using asyncssh as the backend, but I'd rather use this library standalone. Any input is appreciated. Thank you!
Hello! I am trying to run commands against a Cisco network device in series using something like this
But when I run it, the channel seems to be closed after the first command finishes.
Am I missing something painfully obvious or do you think it's something to do with the network device? For what it's worth, I don't see this issue when using paramiko though that doesn't get me the async capabilities. Curiously, I can get it to work using scrapli using asyncssh as the backend, but I'd rather use this library standalone. Any input is appreciated. Thank you!