Paramiko SSH Banner Error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9.9k
- Forks
- 2.1k
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to use ansible + network_cli connection type to connect to a cisco IOS device through a linux bastion host. Below is the ssh route:
linux --> linux --> network_device
I've noticed that the ssh banner returned when manually using the ssh -o ProxyCommand="ssh -W %h:%p @ -p <bastion_port>" <device_username>@<device_ip> might be confusing paramiko. SSH Banner returned:
`**************************************************************************
* IOSv is strictly limited to use for evaluation, demonstration and IOS *
* education. IOSv is provided as-is and is not supported by Cisco's *
* Technical Advisory Center. Any use or disclosure, in whole or in part, *
* of the IOSv Software or Documentation to any third party for any *
* purposes is expressly prohibited except as otherwise authorized by *
* Cisco in writing. *
**************************************************************************user@10.255.1.xxx's password:
**************************************************************************
* IOSv is strictly limited to use for evaluation, demonstration and IOS *
* education. IOSv is provided as-is and is not supported by Cisco's *
* Technical Advisory Center. Any use or disclosure, in whole or in part, *
* of the IOSv Software or Documentation to any third party for any *
* purposes is expressly prohibited except as otherwise authorized by *
* Cisco in writing. *
**************************************************************************`
The end of the banner and the password prompt seem to be on the same line, which I believe is causing ansible to return a "Error reading protocol banner" when trying to run with network_cli (which uses paramiko and ignores any ssh_config file parameters). How would I go about adding a newline to the returned banner so the prompt wont confuse paramiko, if that is a possible issue?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Ansible network_cli connection through the Linux bastion with the shown ProxyCommand, then inspect Paramiko's protocol-banner handling around the reported "Error reading protocol banner." Done means determining whether the Cisco IOSv banner formatting triggers the error and documenting or correcting the supported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible, linux, python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100