Skip to content

Unable to run commands in sequence. #775

Description

@mukkid

Hello! I am trying to run commands against a Cisco network device in series using something like this

with asyncssh.connect(MY_HOST) as conn:
    cmds = ['show version', 'show arp']
    for cmd in cmds:
        out = await conn.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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions