New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Banner and Cisco IOS fail when cmd_verify=True #1531
Comments
You can ignore my earlier comment, it was incorrect and I deleted it. Let me re-test it. |
Okay, I reproduced the issue. You can disable the cmd_verify behavior by doing:
I will need to figure out what to do here... |
Nice for the prompt test. Will stay tuned for the resolving. Thanks |
I wouldn't stay tuned as it might take me a while to fix. I.E. use the fix stated above. Leave this issue open, however, so I can track the issue you referenced. |
Ok, any caveat of using cmd verify false? Still a reliable push? Or I should be only dealing with banner using this? |
It basically just falls back to the Netmiko send_config_set mode that existed prior to Netmiko 3.X.X. |
The most evident you are having a low-speed connection between you and your device. Consider setting a pause between commands that you send to device |
This has been validated by ktbyers as a bug. |
Should be fixed here: Netmiko will auto disable cmd_verify for banner configuration commands. |
I'm having following code to push cisco ios banner to the device.
After upgrade to 3.0, it no longer works. It works fine when switch back to 2.4.2
Exception: <class 'netmiko.ssh_exception.NetmikoTimeoutException'>: Timed-out reading channel, data not available.
I guess it is due to the new expect mechanism in send_config_set since when configuring multi line banner, the device_name# won't be returned yet until the last line of the banner applied.
Here is the code, please advise any solution.
ios_device = {
'device_type': 'cisco_ios',
'ip': "192.168.0.1",
'username': "admin",
'password': "cisco",
'secret': "cisco"
}
net_connect = None
net_connect = ConnectHandler(**ios_device)
banner = [
"banner login ^",
"This is login banner",
"^"
]
net_connect.enable() # I'm using priviledge level 15 so enable is not really an issue
net_connect.send_config_set(banner)
The text was updated successfully, but these errors were encountered: