Unable to ssh
See original GitHub issueNew to all of this and trying to just do basic stuff but not having much luck. I want to just login to a router using python/netmiko and pieced this together from the web but it doesn’t seem to work.
`>>> from netmiko import ConnectHandler
platform = ‘cisco_ios’ host = ‘r1-2911.domain.com’ username = ‘admin’ password = ‘admin’ device = ConnectHandler(device_type=platform, ip=host, username=username, password=password) `
Tried this as well: `>>> from netmiko import ConnectHandler
cisco_2911 = { … ‘device_type’: ‘cisco_ios’, … ‘ip’: ‘10.10.1.1’, … ‘username’: ‘admin’, … ‘password’: ‘admin’, … } netconnect = ConnectHandler(**cisco_2911) ` After running it either way it just returns the python prompt. I got it to fail once when it couldn’t resolve the host name but now it doesn’t fail but it doesn’t seem to succeed either. I am missing something but not sure what?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
I got it working thanks tonypnode.
Trying to paste a copy of my code but the formatting is all messed up.
no worries! We’ve all been there 😃
Instead of going through it on here, please close this issue and you can get a lot better info to get that done pretty fast on the networkToCode slack channel.
http://www.networktocode.com/community/