Router(config)#line con 0
Router(config-line)#exec-timeout 0 0
Sets time limit when console automatically logs off. Set to 0 0 (minutes seconds) means console never logs off
exec-timeout 0 0 is great for a lab because the console never logs out. This bad security is very dangerous in the real world.