A quick tutorial on how to configure a console password on Cisco routers and switches. A console password is asked for only when connecting to the Cisco device via console port so you will NOT be asked for this password when connecting to your Cisco router/switch via telnet or SSH.
Enter the following commands for configuring a console password
Router>enable Router#configure terminal Router(config)#line console 0 Router(config-line)#password consolepw Router(config-line)#login Router(config-line)#exit Router(config)#service password-encryption
Replace the word consolepw with your preferred password. The service password-encryption command stores the password in encrypted format. Yuo can use these commands for configuring a console password on a Cisco switch too.