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