-
Notifications
You must be signed in to change notification settings - Fork 0
/
09Password_Recovery.txt
62 lines (49 loc) · 2.08 KB
/
09Password_Recovery.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Password Recovery of a CISCO Router
====================================
Set all the passwords of a Router
----------------------------------
Router#enable
Router#configure terminal
Router(config)#hostname myRouter
myRouter(config)#enable secret cisco
myRouter(config)#line console 0
myRouter(config-line)#password 123456
myRouter(config-line)#login
myRouter(config-line)#exit
myRouter(config)#line vty 0 4
myRouter(config-line)#password 123456
myRouter(config-line)#login
myRouter(config-line)#exit
myRouter(config)#service password-encryption
myRouter(config)#exit
Backup all the running configurations to startup configuration
----------------------------------------------------------------
myRouter#copy running-config startup-config
***Here, you need to restart the Router
Steps of Password Recovery:
1. First go to Rommon Mode:
press Ctrl+alt+break (Windows) or Ctrl+Shift+C+F6(Linux) from keyboard ---> Now you are in Rommon Mode
2. rommon 1 > confreg 0x2142 (Here, 0x2142 is the Rommon Mode register key)
rommon 2 > reset
Note: 0x2142 --> this is small letter (x) not multiply sign
3. Now go to Privileged mode and run this command
Router>enable
Router#copy startup-config running-config
4. Now go to configuration mode and remove all the passwords that you have configured earlier
myRouter#conf t
myRouter(config)#no enable secret
myRouter(config)#line console 0
myRouter(config-line)#no password
myRouter(config-line)#no login
myRouter(config-line)#exit
myRouter(config)#line vty 04
myRouter(config-line)#exit
myRouter(config)#line vty 0 4
myRouter(config-line)#no password
myRouter(config-line)#no login
myRouter(config-line)#exit
5. Now write the next command with configure key
myRouter(config)#config-register 0x2102
6. Go to the Privileged mode and set all the running configuration to startup configuration
myRouter(config)#exit
myRouter#copy running-config startup-config