How To Enable Cisco IOS Command Archiving

By configuring these settings you will gain functionality on a Cisco device similar to the history command in Linux.

Unfortunately, the “show history” command on Cisco IOS doesn’t actually show you every command that was run.

After configuring these settings you can pull the command history with “show archive log config all” from Privileged Exec mode.

You can adjust the number of stored commands from 1-1000. In addition, I would suggest using “hidekeys” to conceal passwords.


Configuration Command Order:

Virtual_Router_4>
Virtual_Router_4>enable
Virtual_Router_4#conf t
Virtual_Router_4(config)#archive
Virtual_Router_4(config-archive)#log config
Virtual_Router_4(config-archive-log-cfg)#logging enable
Virtual_Router_4(config-archive-log-cfg)#logging size entries

Virtual_Router_4(config-archive-log-cfg)#logging size 1000
Virtual_Router_4(config-archive-log-cfg)#hidekeys
Virtual_Router_4(config-archive-log-cfg)#notify syslog
Virtual_Router_4(config-archive-log-cfg)#end
Virtual_Router_4#wr




How To Use After Configuration:

Virtual_Router_4>enable
Virtual_Router_4#sh archive log config all
idx sess user@line Logged command
1 1 console@console | logging enable
2 1 console@console | logging size 1000
3 1 console@console | hidekeys
4 1 console@console | notify syslog


Virtual_Router_4#






SecureCRT Button Send String from Privileged Exec mode:

archive\r\plog config\r\plogging enable\r\plogging size 1000\r\phidekeys\r\pnotify syslog\r\pend\r\pwr\r






Additional resources: