Python Network Automation Labs: SSH in Action, paramiko and netmiko Labs
摘要
Welcome to Chapter 3 , an immersive journey into Python's SSH libraries—paramiko and netmiko—as integral tools for managing networking devices. This chapter delves into the enduring role of SSH in network infrastructure, tracing the evolution of remote management tools, and explores the robust functionalities of the paramiko and netmiko libraries. It's a hands-on experience that weaves the intricate tapestry of networking and Python programming concepts into practical application. Get ready to traverse through a series of labs that offer real-world exposure, starting with understanding SSH functionalities on Linux servers and Cisco devices, followed by Python SSH labs utilizing paramiko. You'll engage in interactive labs focusing on configuring device settings such as clock, time zones, and NTP servers on Cisco devices. Additionally, exploratory labs will demonstrate interactive paramiko scripts that preserve running configurations. Transitioning to the netmiko library, you learn to install and use it in practical labs, including using a dictionary for device information, crafting a netmiko Disable Telnet script, conducting configuration comparisons, and examining SSH key exchanges between devices—network device to Linux and network device to network device. The hands-on approach here equips you with the practical insights to immediately apply these SSH modules in your work. Furthermore, these labs form the cornerstone for building an IOS XE upgrade application and offer an in-depth exploration of automating device upgrades.