The console port is designed to give physical access to the router to permit initial configurations and disaster recovery. Anybody having console access can completely wipe or reconfigure the files, so, for this reason, the console port should be protected with a password by adding either a password or a local username and password, as illustrated below:
- Add a password
Router(config)#line console 0
Router(config-line)#password cisco
Router(config-line)#login
- Or add a local username and password
Router(config)#username paul password cisco
Router(config)#line console 0
Router(config-line)#login local
You can also create a timeout on the console (and VTY) lines so that it disconnects after a certain period of time. The default is 5 minutes.
Router(config)#line console 0
Router(config-line)#exec-timeout ?
<0-35791> Timeout in minutes
Router(config-line)#exec-timeout 2 ?
<0-2147483> Timeout in seconds
<cr>
Router(config-line)#exec-timeout 2 30
Router(config-line)#