Quiz Entry - updated: 2026.07.05
What Cisco IOS commands help ensure password security on routers and switches?
service password-encryption, security passwords min-length, login block-for, and exec-timeout.
! Encrypt all plaintext passwords in config
Router(config)# service password-encryption
! Set minimum password length (e.g., 8 characters)
Router(config)# security passwords min-length 8
! Block login after failed attempts
! (block for 120 sec after 3 failed attempts within 60 sec)
Router(config)# login block-for 120 attempts 3 within 60
! Auto-logout after inactivity (5 min 30 sec)
Router(config)# line console 0
Router(config-line)# exec-timeout 5 30
! Same for VTY lines
Router(config)# line vty 0 4
Router(config-line)# exec-timeout 5 30
Note: service password-encryption uses weak Type 7 encryption - use enable secret instead of enable password for stronger protection.
Go deeper:
Hardening (computing) — Wikipedia — frames why these commands matter: minimum lengths, login throttling, and timeouts shrink the attack surface.