SSH and Device Hardening lab practice
Replace Telnet with SSH: domain name, RSA keys, local users, VTY transport and login rules, and how to verify each one.
7 labs · 9 lessons · 5 commands · 2 projects
Telnet sends passwords in clear text. SSH encrypts the session, and on Cisco IOS it needs a hostname, a domain name, an RSA key, a local user (or AAA), and VTY lines that accept SSH and require a login.
Hardening the management plane goes further: an enable secret, idle timeouts, login throttling, a banner, and an access-class so only the management network can reach the VTY lines.
Hands-on labs
- Secure Device Access (SSH) (Pro)
- Domain Name and RSA Key Generation (Pro)
- Local Accounts and Privilege Levels (Pro)
- VTY Line Transport Restriction (Pro)
- Full SSH Access Hardening (Pro)
- Restricting Management Access With an ACL (Pro)
- Securing the Management Interface End to End (Pro)
To practise for free, build the topology in the free Sandbox.
Lessons, in order
- Secure Shell (SSH) Configuration (5. Security Fundamentals, 9 min)
- Protect enable access and console sessions (5. Security Fundamentals, 13 min)
- Enforce VTY login, idle timeout and login throttling (5. Security Fundamentals, 13 min)
- Enable SSH with a domain name and RSA keys (5. Security Fundamentals, 15 min)
- Create local users and enforce VTY login (5. Security Fundamentals, 13 min)
- Configure login notices and verify their scope (5. Security Fundamentals, 12 min)
- Assessment: Reach It Over SSH (5. Security Fundamentals, 10 min)
- Enable AAA with a named authentication method list (5. Security Fundamentals, 13 min)
- Capstone: harden a switch's management plane (5. Security Fundamentals, 32 min)
Commands
- show ip ssh — Shows whether the SSH server is enabled, its version, and the authentication timeout and retry limits.
- show ssh — Lists the SSH sessions currently connected to the device, with version, cipher, state and username.
- show crypto key mypubkey rsa — Shows the RSA key pairs the device has generated, which SSH needs before it can start.
- show running-config — Shows the configuration the device is running right now, including changes that have not been saved.
- show access-lists — Lists every access list with its entries in order, their sequence numbers and how many packets each has matched.
Related projects
- Secure Network Device Administration — An insurance audit at Brookfield Credit Union found its edge router still managed over Telnet with a shared password. Fix the front door: SSH only, named accounts with hashed passwords, an enable secret, and a banner that warns rather than welcomes.
- Enterprise Device Management Hardening (Mgmt VLAN, SSH, VTY ACL, Banner) — A compliance audit discovered that network switches are managed over cleartext Telnet on the default VLAN 1 using weak passwords. You must implement defense-in-depth management hardening: provision out-of-band management VLAN 99, enable SSH version 2, restrict VTY line access strictly to the admin subnet via ACL, and configure warning banners.