Re-enable debugging on router reload

It's a bit embarrassing: I've posted a hint on how to execute commands after a router reload and Aamer figured out something I've wanted to have for years: the ability to automatically start debugging after the router reload.For example, to enable debugging of incoming SSH connections, use the following EEM applet:

event manager applet EnableDebugging
event syslog occurs 1 pattern "%SYS-5-RESTART"
action 1.0 cli command "enable"
action 2.0 cli command "debug ip ssh"

1 comment:

  1. For versions of IOS that don't support EEM but do support the config command 'do', you could modify the config off of the router and add a 'do debug...' command to the end then copy the config back directly into the startup-config. It's messy I know, but it does work.


You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.