思科路由器密码恢复

拓扑图:
思科路由器密码恢复

  • 1 配置任意特权加密密码,并保存

Router>enable 
Router#config t 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface g 0/0 
R1(config-if)#ip address 192.168.1.1 255.255.255.0 
R1(config-if)#no shutdown
R1(config-if)#enable secret asdf
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console

R1#wr
Building configuration...
[OK]
R1#
  • 2 重启路由器reload

  • 3 在加载系统过程中, 使用 Ctrl+Break 键或者 Ctrl+C 键,修改 confreg寄存器的值,使路由器绕过配置文件进入系统

    rommon 1 > help
    boot                boot up an external process
    confreg             configuration register utility
    dir                 list files in file system
    help                monitor builtin command help
    reset               system reset
    set                 display the monitor variables
    tftpdnld            tftp image download
    unset               unset a monitor variable
    rommon 2 > confreg 0x2142
    rommon 3 > reset
  • 4 此时已可以不输入密码即可进入系统,这时我们重新配置密码。配置密码完成后,修改confreg寄存器的值,引导系统正常启动。
Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R1
R1(config)#enable sec
R1(config)#enable secret 123abc
R1(config)#config-register 0x2102
R1(config)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console

R1#wr
Building configuration...
[OK]
  • 5 最后重启reload

转载于:https://blog.51cto.com/12184141/2313148

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值