Interacting with network devices via SSH
Secure Shell (SSH) is the predominant protocol that network engineers use to securely access and configure network devices via a command-line interface (CLI) that transports unstructured data to display to end users. This interface simulates a computer terminal, so we’ve used it traditionally for human interactions.
One of the first steps network engineers take when they embark on the journey of automating mundane tasks is to create scripts that run a set of CLI commands for them in sequence to achieve an outcome. Otherwise, they would run the commands themselves interactively via an SSH pseudo-terminal.
While this gives us speed, this is not the only benefit of network automation. As we cover different technologies through the rest of this book, other benefits, such as reliability, repeatability, and consistency, to name a few, become a common theme. For now, we will start by crafting an SSH connection to a network device in Go...