Cisco Switch and Router Password Recovery: Step-by-Step Guide

Ever found yourself locked out of a Cisco router or switch because of a forgotten password? Don’t worry you’re not alone. Fortunately, Cisco has built-in recovery options that allow network admins to regain access without losing configurations.
Heres a clear and practical guide to recovering your Cisco device password:
1. Connect to the Device via Console
- Use a console cable and terminal emulator (like PuTTY or Tera Term).
- Connect to the console port of the device.
2. Reboot the Device
- Power cycle the device.
- While it’s booting up, you’ll need to interrupt the boot sequence.
3. Break the Boot Sequence
- During boot-up, press Ctrl + Break (or Ctrl + Pause/Break on some keyboards).
- This will bring you to ROMmon mode (ROM Monitor).
4. Change the Configuration Register
At the rommon> prompt, type:
Confreg 0x2142
This tells the device to ignore the startup configuration (including passwords) during the next boot.
5. Reload the Device
- Type reset to reboot the device.
- The router or switch will now boot without loading the saved config.
- Once booted, you’ll be in user mode.
6. Enter Privileged EXEC Mode
- Type enable no password should be required now.
- Then enter global configuration mode
- Configure terminal
7. Recover and Reset the Password
View your current config (if needed) with:
Show startup-config
Reapply the necessary parts of the config, and set a new enable secret:
Enable secret YOURNEWPASSWORD
8. Restore the Configuration Register
Before saving, make sure to set the config register back to normal:
Config-register 0x2102
9. Save and Reload
Copy the running config back to startup:
Copy running-config startup-config
Reload the device to ensure the password is now active and the config is restored correctly.
That’s it!
This process allows you to regain access without losing your configuration. It’s an essential skill every network admin should have in their toolkit.
No Comments