Closed foats closed 7 years ago
@foats Can you show me what a manual CLI session looks like (I want to see how the login interaction looks like)?
Obviously just remove/hide the password.
So the Netmiko login works fine?
Kirk
$ssh 400usw04003 password: 400USW04003>en password: 400USW04003#
Is this what you are looking for? It might not even be AAA could just be the fact that I have to got to enable mode separately, this works fine for me on my other switch that has no AAA and just a priv 15 user configured.
So netmiko technically doesn't work! Just checked with a show run command, Netmiko is not going into enable mode.
@foats This error indicates it failed authentication i.e. didn't successfully SSH in:
netmiko.ssh_exception.NetMikoAuthenticationException: Authentication failure: unable to connect cisco_ios 400usw04003:22
Authentication failed.
I see you said:
--password <pass-with-special-char>
I don't know what special character means but did you single quote this entire string?
--password '<pass-with-special-char>'
(with the assumption that you have no single quotes in your password).
You will also need to pass the secret as an optional argument.
Your code should look something like this:
#!/usr/bin/env python
from getpass import getpass
from napalm_base import get_network_driver
ip_addr = '10.10.10.10'
username = 'admin'
password = getpass()
optional_args = {}
optional_args['secret'] = getpass("Enter your secret: ")
driver = get_network_driver('ios')
device = driver(ip_addr, username, password, optional_args=optional_args)
print(">>>Test device open")
device.open()
print(">>>Test get facts")
device_facts = device.get_facts()
print(device_facts)
Hi @foats - we are currently in the process of reunification, please check https://napalm-automation.net/reunification/. For the time being, we have moved this issue to https://github.com/napalm-automation/napalm/issues/472 so we can discuss further. Going forward, we'd like to ask you to submit Pull Requests and Issues to the main repository: https://github.com/napalm-automation/napalm
Thanks for understanding!
Description of Issue/Question
Did you follow the steps from https://github.com/napalm-automation/napalm#faq
Setup
napalm-ios version
(Paste verbatim output from
pip freeze | grep napalm-ios
between quotes below)IOS version
(Paste verbatim output from
show version
between quotes below)Steps to Reproduce the Issue
Error Traceback
(Paste the complete traceback of the exception between quotes below)
This switch uses TACACS - I can login fine, password is not wrong - I even tested netmiko script below from netmiko import ConnectHandler
cisco_3750 = {'device_type': 'cisco_ios', 'ip': '25.4.232.9', 'username': 'jloatman', 'password': '', 'port': 22,}
net_connect = ConnectHandler(**cisco_3750)
output = net_connect.send_command('show ip int brief') print(output)