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.

using netmiko on Juniper EX vs MX

See original GitHub issue

Hey Kirk,

Is there anything special i need to do in order to run Netmiko on Juniper EX devices. For some reason it only will log into the Juniper MX class but no the EX class.

any ideas?

hostfile="/opt/scripts/Lord/tacacs_project/juniper_list.txt"
username = 'admin'
password = getpass()
platform = 'juniper_junos'

###### Open file that contains the list of devices
with open(hostfile) as f:
    for line in f:
        host = line.strip()
        try:
            print ("Connecting")
            device = ConnectHandler(device_type=platform, ip=host, username=username, password=password)
            time.sleep(1)
            print ('Connected to Juniper box, gathering info.....')
            version = device.send_command('show version')
            ports = device.send_command('show interfaces descriptions')
            mgmt = device.send_command('show conf interfaces vlan unit 101 | display set')
            mgmt_mx = device.send_command('show configuration interfaces irb | display set')

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
theLORD97commented, Mar 19, 2019

ok thanks, i’m going to run it on 200 devices tonight, so i’ll keep you posted…

thx guys

0reactions
ktbyerscommented, Mar 19, 2019

Okay, I am going to close this. If you are able to reproduce the problem and a stack trace, please feel free to re-open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NETMIKO Automation on Juniper Routers - Full Tutorial for ...
We'll start the post with a high-level look at the library and then jump right in by writing a program to automate config...
Read more >
Managing JUNOS device using Netmiko - Devang Patel
Documenting the way I learned to use Netmiko with JUNOS device. How to copy the file on to the router?
Read more >
Juniper Network Automation using Python–Part 1
In This multi-posts series, We will deep dive into Juniper network automation and how to automate both configuration and operation for ...
Read more >
How to use Python script with Netmiko Library to SSH Juniper ...
Netmiko is an open source SSH python library that simplifies the SSH management across wide range of network devices.
Read more >
Python and JunOS : r/networking - Reddit
34 votes, 34 comments. For those who work in a Juniper shop, how do you change your local password? I was using the...
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