Allows you to lock your terminal with a one time password.
- Before using the Lock command you must first enable it by typing lockable under the console or VTY lines
- Type Lock
- You will be prompted to set a password, this is a one-time use password and shouldn’t be a password already on the router
- You will be asked to confirm the password. To regain access to the router type the password you have chosen.
While this technically isn’t a CCNA level command it is a good one to know. Imagine that you are connected to the console of a device via a terminal server and you need to leave the room to check the cabling on the device. Since you are logged on the router with your login you probably don’t want other people using your console connection. So you can lock the console connection until you get back using lock.
R1(config)#line con 0 R1(config-line)#lockable R1(config-line)#^Z R1# *Mar 1 00:08:15.311: %SYS-5-CONFIG_I: Configured from console by console R1#lock Password: **** Again: **** Locked Password: **** R1#