liveBook · Manning

SSH

As explained in Acing the CCNA Exam: Volume 2 Advanced Networking and Security

SSH is a protocol that provides authenticated and encrypted remote shell access and other secure network services.

SSH provides encrypted remote CLI access to Cisco routers and switches over an IP network. Unlike Telnet, it protects communications from interception and supports remote configuration, verification, and troubleshooting. section 5.0 section 5.3

Configure SSH on Cisco IOS by completing these core steps:

  • Generate an RSA key pair; a modulus of at least 768 bits is required for SSHv2. section 5.3 section 5.3.2
  • Create a local username and enable secret so users can authenticate and enter privileged EXEC mode. section 5.3.2
  • Configure the VTY lines with login local and transport input ssh; use line vty 0 15 to configure all 16 lines. section 5.3.2 section 5.4
  • Prefer ip ssh version 2, apply an inbound access-class, and set exec-timeout to limit exposure and inactive sessions. section 5.3.2

Connect to a switch

From a host, run ssh -l jeremy 10.0.0.2, enter the account password, and reach the SW1> prompt. Cisco IOS can also initiate the connection with the same -l form; the username@address form is not supported by Cisco IOS. section 5.3.2

SW1(config)# enable secret cisco                            #1
SW1(config)# username jeremy secret ccna                    #1
SW1(config)# access-list 1 permit 192.168.1.0 0.0.0.255     #2
SW1(config)# ip ssh version 2                               #3
SW1(config)# line vty 0 15                                  #4
SW1(config-line)# login local                               #5
SW1(config-line)# exec-timeout 20                           #6
SW1(config-line)# transport input ssh                       #7
SW1(config-line)# access-class 1 in                         #8
#1 Configures an enable secret and user account
#2 Creates an ACL to limit access to the VTY lines
#3 Limits connections to SSH version 2 only
#4 Configures all 16 VTY lines
#5 Requires users to log in with a user account
#6 Logs out users after 20 minutes of inactivity
#7 Allows only SSH connections
#8 Applies the ACL

Use the annotated configuration as a compact reference for local authentication, SSHv2-only access, VTY selection, timeout control, SSH-only transport, and source filtering. section 5.3.2

How Acing the CCNA Exam: Volume 2 Advanced Networking and Security covers it

How deep it goes
Explains encryption, RSA keys, SSH versions, VTY configuration, authentication, access control, timeouts, and connection commands.
Examples
Uses annotated Cisco IOS configuration, PC and router SSH commands, password prompts, and resulting device CLI prompts.
What it assumes
Assumes basic Cisco IOS CLI and IP connectivity while teaching local accounts, VTY authentication, and remote-management access requirements.
What you can do after
Operate/configure Cisco IOS SSH access, restrict VTY connections, initiate sessions, and distinguish SSH from insecure Telnet.
How it connects
Connects SSH with Telnet, RSA keys, VTY lines, local user accounts, enable secrets, ACLs, and remote management IP addressing.

Also explained in

Compare how 4 books explain SSH →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 2 Advanced Networking and Security. The section links point to the parts of the book it draws on.