question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New 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:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
net9000commented, Oct 20, 2018

I got it working thanks tonypnode.

Trying to paste a copy of my code but the formatting is all messed up.

0reactions
tonypnodecommented, Oct 20, 2018

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/

Read more comments on GitHub >

github_iconTop Results From Across the Web

4 Reasons Why SSH Connection Fails - Linux.com
1. Our SSH Public Key Is Not Injected To Servers. · 2. Firewall Prevents Us From Connecting · 3. Host Key Check Fails...
Read more >
How to troubleshoot SSH connectivity issues - LayerStack
Make sure that the IP address of the server is correct. · Confirm that your network allows SSH connection. · Verify that the...
Read more >
How to Troubleshoot SSH Connectivity Issues
Verify that the host IP address is correct for the Droplet. · Verify that your network supports connectivity over the SSH port being...
Read more >
How to Fix the SSH "Connection Refused" Error - phoenixNAP
Typos or incorrect credentials are common reasons for a refused SSH connection. Make sure you are not mistyping the username or password. Then, ......
Read more >
How to Fix the SSH "Connection Refused" Error - Kinsta
How Do I Troubleshoot SSH Connectivity Errors? · If your SSH service is down. Contact your hosting provider to see why your SSH...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found