思科IOS绕密码开机实例

修改寄存器值应用实例:

某些原因:
上一任攻城狮、网管将公司设备设置了密码又不告诉你的情况下,而又你接替了他的位子,不晓得或者忘记了密码需要不删除原有数据的情况下开启设备,就需要用到这项操作!
在这里插入图片描述
路由器的配置命令
#line console 0
Router(config-line)#password cisco
Router(config-line)#login
Router(config-line)#exit
Router(config)#line vty 0 4
Router(config-line)#password cisco
Router(config-line)#login
Router(config-line)#exit

Router(config)#enable password cisco
Router(config)#exit

%SYS-5-CONFIG_I: Configured from console by console
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#inter f0/0
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

服务器Telnet命令
User Access Verification

Password:
Router>en
Password:
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#

由于不知道密码只能通过断电重启
按Ctrl+break键进入ROM Monitor模式
Self decompressing the image :
################
monitor: command “boot” aborted due to user interrupt
rommon 1 >
rommon 1 >
rommon 1 > confreg 0x2142////修改寄存器值让它启动不加载启动配置文件进入初始配置模式
rommon 2 >reset \\\\重启设备

     --- System Configuration Dialog ---

Continue with configuration dialog? [yes/no]: n

Router#Copy startup-config running-config \\\\\\恢复设备原本的配置文件
Show run \\\\记录密码或者重新在全局配置模式下设置密码
#line console 0
Router(config-line)#password cisco
Router(config-line)#login
Router(config)#line vty 0 4
Router(config-line)#password cisco
Router(config-line)#login

Router(config)#enable password cisco
Router(config)#exit

Press RETURN to get started!
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#config-register 0x2102 \\\\\\把寄存器值修改回去正常启动
Router#copy running-config startup-config
Router#reload \\\走人!

猜你喜欢

转载自blog.csdn.net/weixin_45138093/article/details/106863548