04-14-2019 12:12 AM
Hello,
I have configured Cisco 2960 Switch as per requirement. I have tested both Line VTY & Console access was working after entering correct credentials. but after because of change in device naming conventions i got request to change "hostname" of the switch. I have changed hostname as per suggested but after doing so i lost SSH as well as console access of the switch.
What was problem here??
04-14-2019 01:23 AM - edited 04-14-2019 01:26 AM
Hi,
This may be happening due to Certificate issue. try with below commands but first must remove the old certificate.
crypto key zeroize rsa
crypto key generate rsa
04-14-2019 01:23 AM
Hello,
when you generate the crypto key, the hostname of the switch together with the domain name is connected to that key. If you change the hostname, the key is not valid anymore, so you need to zeroize it and generate another one:
SWITCH1#sh crypto key mypubkey rsa
% Key pair was generated at: 08:12:54 UTC Apr 14 2019
Key name: SWITCH1.mydomain.com
SWITCH2#conf t
SWITCH2(config)#crypto key zeroize rsa
SWITCH2(config)#crypto key generate rsa
SWITCH2#sh crypto key mypubkey rsa
SWITCH2#sh crypto key mypubkey rsa
% Key pair was generated at: 08:18:35 UTC Apr 14 2019
Key name: SWITCH2.mydomain.com
04-14-2019 01:55 AM
I do not think that this problem is related to the crypto keys as it also shows up on the console. Do you have a session-log of what you configured? Perhaps there was something else that went wrong.
06-13-2019 02:34 AM - edited 06-13-2019 02:35 AM
Hi Dear,
What about if we try password recovery procedure when not getting appropriate response/ideas within limited time:
Below process you can follow for PASSWORD RECOVERY. So you can get access to your device back.
Attach a terminal or PC with terminal emulation (for example, Hyper Terminal, SecureCRT or Putty etc) to the console port of the switch.
1- Unplug the power cable.
2- Power the switch and bring it to the switch: prompt:
3- Hold down the mode button located on the left side of the front panel, while you reconnect the power cable to the switch. Release the Mode button when the SYST LED blinks amber and then turns solid green. When you release the Mode button, the SYST LED blinks green.
4- Follow the below commands in the roman mode:
i- switch: flash_init
ii- switch: dir flash:
iii- rename flash:config.text flash:config.old
(switch: !--- The config.text file contains the password !--- definition.)
iv- switch: boot
Enter "n" at the prompt to abort the initial configuration dialog.
Switch>enable
Switch#rename flash:config.old flash:config.text
The configuration file is now reloaded.
Note: Overwrite the passwords which are necessary. You need not overwrite all of the mentioned passwords.
Switch# configure terminal
Switch(config)#enable secret <SECRET>
OR
Switch(config)#enable password <PASSWORD>
Switch(config)#line vty 0 15
Switch(config-line)#password <PASSWORD>
Switch(config-line)#login
Switch(config-line)#transparent input all
Switch(config-line)#line console 0
Switch(config-line)#password <PASSWORD>
Switch(config-line)#login
Switch(config-line)#end
Switch#copy flash:config.text system:running-config
Switch#copy running-config startup-config
Please rate the helpful posts, thanks.
Regards,
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide