How to recover Cisco catalyst L2 and L3 switch password

Step1: Connect a PC with terminal emulation (for example, Hyper Terminal) to the console port of the switch using the following terminal settings:

  • Bits per second (baud): 9600
  • Data bits: 8
  • Parity: None
  • Stop bits: 1
  • Flow Control: Xon/Xoff

Unplug the power cable and hold down the mode button located on the left side of the front panel, while you reconnect the power cable to the switch. Hold down for 5 seconds for Cisco 2950/2960 and 15 seconds for Cisco 3550/3750.

Step 2: Now you will be presented with Switch: Issue the flash_init command on switch: flash_init

Step3: Issue the load_helper command switch: load_helper

Step4: Type switch: dir flash: to see config file and .bin file of switch.

Step5: Type rename flash:config.text flash:config.old to rename the configuration file. It will keep existing config intact.

Step6: Issue the boot command to boot the system. switch: boot Now switch will start booting as it does normally. Enter “n” at the prompt to abort the initial configuration dialog. Continue with configuration dialog? [yes/no]: n  No initial configuration required as it is already configured.

Step7: At the switch prompt, type en to enter enable mode. Issue following command.



Switch#rename flash:config.old flash:config.text

Press Enter

Switch#copy flash:config.text system:running-config

Press Enter


Sw1# conf t

Sw1(config)#enable secret <your_secret_password>

Sw1(config)#enable password <Your_enable_password>

To reset VTY password

Sw1(config)#line vty 0 15

Sw1(config-line)#password <your_vty_password>


To Reset Console Password

Sw1(config-line)#line con 0

Sw1(config-line)#password <your_console_password>


Note: This procedure works for for 2900XL, 3500XL, 2940, 2950, 2960, 2970, 3550, 3560, and 3750 series switches.

Keywords: Cisco, Layer 3 switch, Layer 2 switch, password recovery.

2 thoughts on “How to recover Cisco catalyst L2 and L3 switch password

  1. Hi Raihan, may I ask if I’m able to capture the content of the old config after the password recovery process is completed. Thanks in advance.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.