一、創建console鏈接
二、重啓啓動安全設備
三、進入ROMMMON模式
出現Use BREAK or ESC to interrupt boot字樣時,按下ESC鍵進入ROMMON模式。
四、設置ROMMON配置寄存器
Rommon #0>confreg
Do you want to change this configuration? y/n[n]:y
在disable system configuration?處選擇「y"
Disable system configuration?y/n[n]:y
五、啓動安全設備
Rommon #1>boot
六、訪問特權模式
Ciscoasa>
Ciscoasa>enable
Password:<cr>
Ciscoasa#
七、載入存儲的配置文件
Copy startup-config running-config
八、從新設置密碼
ASA#config ter
ASA(config)#passwd Ci$co123
ASA(config)#enable password Ci$co123
若是設備使用的是本地的用戶認證,那麼用戶密碼也能夠進行修改:
ASA(config)#username cisco password Ci$co123
九、恢復配置寄存器
ASA(config)#config-register 0x1
十、將當前配置保存近NVRAM
ASA(config)#copy running-config startup-config 或 write memory
禁用密碼恢復流程:若是配置了這一條命令,會彈出告警信息,告知管理員,恢復密碼的惟一方式就是清除flash中的全部文件。而後再從外部服務器(如TFTP)中下載新的鏡像和配置文件。
ASA(config)#no service password-recovery
在禁用密碼恢復流程的狀況下恢復密碼:
一、創建一條console鏈接
二、重啓設備
三、進入ROMMON模式
四、從flash中清除系統文件
Erase all file systems?y/n[n]:y
Permanently erase Disk0:and Disk1:?y/n[n]:y
Erase Disk0:
……………………………………………
!Output omitted for brevity
Disk1:is not present
Enabling password recovery…
Rommon #0>
五、載入一個系統鏡像文件
Rommon #0>address=172.18.82.75
Rommon #1>server=172.18.82.10
Rommon #3>interface gigabitEthernet0/1
GigabitEthernet0/1
MAC Address:000f.f775.4b54
Rommon #4>file asa914-smp-k8.bin
Rommon #5>tftpdnld
Tftp asa914-smp-k8.bin@172.18.82.10
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
設備將系統文件下載到內存中並重啓設備,可是,下載的鏡像文件並不會被存在flash中。
六、載入配置文件
Ciscoasa>enable
Password:<cr>
Ciscoasa#config ter
Cicsoasa(config)#inter management0/0
Ciscoasa(config-if)#ip add 172.18.82.75 255.255.255.0
Ciscoasa(config-if)#nameif management
INFO:Security level for "management" set to 0 by default
Ciscoasa(config-if)#security-level 100
Ciscoasa(config-if)#no shu
Ciscoasa(config)#copy tftp:running-config
Address or name of remote host[]?172.18.82.10
Source filename[]?asa.conf
Destination filename[running-config]?
Accessing tftp://172.18.82.10/asa.conf…!!
Cryptochecksum(unchanged):1c9855a1 2cca93c7 a9691450 9bab6e92
1246 bytes copied in 0.90 secs
Ciscoasa#
七、重設密碼
Ciscoasa#config t
Ciscoasa(config)#passwd Ci$co123
Ciscoasa(config)#enable password Ci$co123
若是是本地用戶認證,也能夠修改本地用戶密碼
Ciscoasa(config)#username cisco password Ci$co123
八、將當前配置保存到NVRAM
Ciscoasa(config)#copy running-config startup-config
九、將ASA鏡像文件載入flash。能夠參考ASA CLI升級鏡像的操做。
安全