Repolode
ktbyers

ktbyers/netmiko

Python library that simplifies SSH CLI connections to multi-vendor network devices, for sending show commands and config changes.

Stars
4,319
Forks
1,393
Open issues
60
Last commit
8 days ago

What is it?

Netmiko is a Python library built on top of Paramiko that makes it easier to connect to network devices over SSH and interact with their command-line interfaces. Network automation often involves gathering output from show commands or pushing configuration changes, and Netmiko handles these operations across a broad set of device platforms.

Instead of writing low-level prompt handling and regex matching for each vendor, users pass a device dictionary with a device_type such as cisco_ios and call methods like send_command or send_config_set. The library takes care of entering configuration mode and waiting for prompts. Connections can be used as context managers so sessions are closed reliably.

The project supports Python 3.11 and later and is installed with pip. Supported platforms are listed in the project's PLATFORMS document, and examples and API documentation are available alongside the code.

Key features

  • 01Sends show commands to network devices and returns their output.
  • 02Pushes configuration changes and enters config mode automatically.
  • 03Supports a wide range of network vendor platforms selected by device_type.
  • 04Can be used as a context manager so SSH sessions are always disconnected.
  • 05Built on Paramiko for the underlying SSH transport.

Use cases

  • Collecting interface or routing state from a fleet of switches and routers.
  • Automating repetitive configuration changes across network devices.
  • Building network audit or compliance scripts that read device output.

Quick start

  1. 1

    Install Netmiko with pip

    pip install netmiko
  2. 2

    Create a device dictionary and open an SSH connection with ConnectHandler

  3. 3

    Run a show command with send_command

Things to know

  • Requires Python 3.11 or newer; Python 3.10 and earlier are no longer supported.
  • Focused on CLI screen-scraping over SSH, so it is not a fit for APIs or non-CLI management.

In collections

Topics

#network-automation#ssh#python#paramiko#networking#cli

FAQ

What is netmiko?
Python library that simplifies SSH CLI connections to multi-vendor network devices, for sending show commands and config changes. Netmiko is a Python library built on top of Paramiko that makes it easier to connect to network devices over SSH and interact with their command-line interfaces. Network automation often involves gathering output from show commands or pushing configuration changes, and Netmiko handles these operations across a broad set of device platforms.
Is netmiko free to use? What license does it have?
netmiko is open source under the MIT license. Check the license terms before using it in commercial products.
Is netmiko still maintained?
Actively maintained. The last commit to netmiko was on Oct 30, 2026.
What can I use netmiko for?
Collecting interface or routing state from a fleet of switches and routers. Automating repetitive configuration changes across network devices. Building network audit or compliance scripts that read device output.
How do I install netmiko?
Install Netmiko with pip: pip install netmiko Create a device dictionary and open an SSH connection with ConnectHandler Run a show command with send_command
Where can I get netmiko?
The source code and installation instructions are on GitHub: https://github.com/ktbyers/netmiko

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects

Open-source source-of-truth web application for modeling and documenting network infrastructure, with a REST and GraphQL API for automation.

DevOps & Cloud#network-automation#ipam#dcim
21.9K+52 this week3.2KPythonApache-2.0Well maintainedUpdated 21 hours ago