zNetLaB › Guided labs › Security
Device hardening — passwords, SSH only, banners, idle timeouts
Security Beginner 2 devices 6 checked tasks 100 points Free lab
A new router arrives with telnet open, a clear-text password and no warning banner. Make it the way an auditor wants it: an enable secret, encrypted passwords in the configuration, a legal banner, SSH version 2 as the only remote access with a local account, and idle sessions that time out. You build it in a browser, type real commands at each device, and every task below is
checked against the running configuration — so you find out it is wrong before anybody else does.
Open this lab in the simulator
The simulator runs in your browser with nothing to install. This is a free lab: it stays open on the free plan. It needs an account, which keeps your progress.
The scenario
A new router arrives with telnet open, a clear-text password and no warning banner. Make it the way an auditor wants it: an enable secret, encrypted passwords in the configuration, a legal banner, SSH version 2 as the only remote access with a local account, and idle sessions that time out.
Your role: a security engineer. Level: Beginner Done when: all 6 goals show as passed (100 points).
Network status
Devices: 1 router, 1 PC, cabled as drawn. No Layer 1 or Layer 2 faults: every link is connected and up. Edge-R1 starts with addresses (G0/0 10.0.0.1/24). Admin-PC is a host with 10.0.0.20/24, gateway 10.0.0.1.
Known problems
None: nothing is misconfigured. The network is simply not finished: what the goals list is what you have to build or secure.
Goals
The privileged password is an enable secret (hashed), not a clear-text enable password (20 pts) Passwords in the configuration are encrypted (service password-encryption) (15 pts) A login banner warns that access is monitored (15 pts) The VTY lines accept SSH only, with a local account and an RSA key (30 pts) SSH version 2 is enforced (10 pts) Idle VTY sessions time out within 5 minutes (10 pts)
The activity, in order
The privileged password is an enable secret (hashed), not a clear-text enable password The configuration of Edge-R1 must contain the line: enable secret. Type it in the right mode (global, interface or line) and check it appears. The configuration of Edge-R1 must contain the line: . Type it in the right mode (global, interface or line) and check it appears.Why: This is the task that checks your configuration directly: the line must really be there, not just look right. Verify with: show running-config Passwords in the configuration are encrypted (service password-encryption) The configuration of Edge-R1 must contain the line: service password-encryption. Type it in the right mode (global, interface or line) and check it appears.Why: This is the task that checks your configuration directly: the line must really be there, not just look right. Verify with: show running-config A login banner warns that access is monitored The configuration of Edge-R1 must contain the line: banner motd. Type it in the right mode (global, interface or line) and check it appears.Why: This is the task that checks your configuration directly: the line must really be there, not just look right. Verify with: show running-config The VTY lines accept SSH only, with a local account and an RSA key Do what the title says on the device shown in the topology, then run the show command that proves it.Why: Each goal is a state the lab can check on the running device. Verify with: show running-config SSH version 2 is enforced The configuration of Edge-R1 must contain the line: ip ssh version 2. Type it in the right mode (global, interface or line) and check it appears.Why: This is the task that checks your configuration directly: the line must really be there, not just look right. Verify with: show running-config Idle VTY sessions time out within 5 minutes The configuration of Edge-R1 must contain the line: line vty[^!]*exec-timeout [1-5] 0. Type it in the right mode (global, interface or line) and check it appears.Why: This is the task that checks your configuration directly: the line must really be there, not just look right. Verify with: show running-config
Tips
Work in the order given: later goals depend on the earlier ones. After every change, run the verify command before moving on; do not guess. Stuck? Read the verify output first. It names the interface, neighbour or route that is wrong. Common mistake: Generating RSA keys on a router still named “Router” — it refuses Common mistake: “transport input ssh” without “login local”, so nobody can log in Common mistake: Leaving the old “enable password” in the configuration next to the secret
Why this matters
A default device is a soft target: clear-text passwords, telnet, no banner, sessions that never time out. Hardening is the unglamorous first line of defence and an audit checklist item everywhere.
What you will be able to do
Use enable secret and encrypt stored passwords
Restrict remote access to SSH version 2 with a local account
Add a legal banner and idle timeouts
The network
ISR 2911, PC — 2 devices in all, already cabled.
Gi0/0 10.0.0.1/24 Fa0 Edge-R1 Admin-PC 10.0.0.20/24 · gw 10.0.0.1 Drawn from this lab: devices, cables, ports and the addresses already set.
Device Model Address already set
Edge-R1 ISR 2911 configure it
Admin-PC PC 10.0.0.20 / 255.255.255.0 gw 10.0.0.1
Cabling
Edge-R1 Gi0/0 ↔ Admin-PC Fa0
What is configured at the start
These are already configured when the lab opens — including, where this is a troubleshooting lab, the fault itself:
Edge-R1 interface g0/0
ip address 10.0.0.1 255.255.255.0
no shutdown
exit
enable password cisco
line vty 0 4
password cisco
login
transport input telnet
exit
Tasks, and how each one is checked
Every task is decided by reading the live network — a neighbour in FULL, a ping that succeeds, a line in the running configuration — not by looking for a keyword you typed. The same command shows you what the lab sees.
# Task Pts How to verify it yourself
1 The privileged password is an enable secret (hashed), not a clear-text enable password 20 On Edge-R1: show running-config contains the line(s) matching enable secret. and On Edge-R1: show running-config contains the line(s) matching enable password must not .
2 Passwords in the configuration are encrypted (service password-encryption) 15 On Edge-R1: show running-config contains the line(s) matching service password-encryption.
3 A login banner warns that access is monitored 15 On Edge-R1: show running-config contains the line(s) matching banner motd.
4 The VTY lines accept SSH only, with a local account and an RSA key 30 Checked automatically against the device’s live state (sshOnly).
5 SSH version 2 is enforced 10 On Edge-R1: show running-config contains the line(s) matching ip ssh version 2.
6 Idle VTY sessions time out within 5 minutes 10 On Edge-R1: show running-config contains the line(s) matching line vty … exec-timeout [1-5] 0.
Stuck? Ask the coach
Tell the coach what you see or what you tried. It gives you a hint, not the answer, the way a senior engineer would. Included with a free trial or any plan.
Ask the coach
Common mistakes
Generating RSA keys on a router still named “Router” — it refuses
“transport input ssh” without “login local”, so nobody can log in
Leaving the old “enable password” in the configuration next to the secret
Reference solution
Try it yourself first — the lab checks your work either way. This is one configuration that makes every task pass, device by device:
Edge-R1 no enable password
enable secret Str0ng!Secret
service password-encryption
banner motd #Authorised access only. Activity is monitored.#
ip domain-name znetlab.lab
username admin secret Adm1n!Pass
crypto key generate rsa modulus 2048
ip ssh version 2
line vty 0 4
login local
transport input ssh
exec-timeout 5 0
exit
Where this is examined
CCNA (device security), Security+ (secure baselines), CCNP SCOR (management plane), Network+ (hardening).
This lab practises these topics in the zNetLaB certification courses:
Related labs
Where to start
The lessons are open to everyone, all guided labs are listed by track, and
plans explains what is free and what is not.
CCNA®, CCNP® and Cisco® are trademarks of Cisco Systems, Inc. zNetLaB is not affiliated with or endorsed by Cisco.