5.3 Configure and verify local-password protection of device access

CCNA 200-301 v1.1 · 5.0 Security Fundamentals

The first line of defence on a router or switch is its own login: who can reach the CLI from the console and the network, and who can reach privileged mode. For the CCNA you protect each access point (console, VTY, privileged EXEC) with passwords or local users, store them hashed, and add login protection.

What you must know

Privileged mode and lines

enable secret Ena8le!Secret
!
line console 0
 password C0nsole!
 login
 exec-timeout 5 0
!
username admin privilege 15 secret Adm1n!Pass
line vty 0 15
 login local
 transport input ssh
CommandStored asUse
enable passwordClear text (type 7 with encryption)Avoid
enable secretHash (type 5 MD5, 8 PBKDF2 or 9 scrypt)Always
username … passwordClear text (type 7 with encryption)Avoid
username … secretHashAlways

If both enable password and enable secret exist, the secret is used. login on a line uses the line's password; login local uses the usernames.

Encryption, lockout and banners

service password-encryption
security passwords min-length 10
login block-for 120 attempts 3 within 60
banner motd # Authorised access only. Activity is logged. #

Commands

show running-config | section lineThe line settings: passwords, login method and transport.
show running-config | include secret|passwordWhich passwords are hashed and which are not.
show loginLogin block settings and whether the device is in quiet mode.
show usersWho is logged in, on which line, and for how long.

Exam traps

Check yourself

A router has enable password cisco and enable secret class. Which opens privileged mode?
class, the secret.
What does service password-encryption protect against?
Casual viewing of the configuration. Type 7 can be decoded easily.
How do you block logins for two minutes after three failures in one minute?
login block-for 120 attempts 3 within 60.

Labs

Try it live: Secure device access: passwords, SSH, CDP and LLDP

More topics in 5.0 Security Fundamentals