Enables console session locking.
- 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. Confirm the password by re-entering it.
- To regain access to the router, type the password you have chosen.
In this example the console is set to lockable. Afterwards, the user issues the lock command to lock his current session. When using
lock to lock the session, the user is prompted to enter a password. Once the user unlocks the session by hitting enter, they have to use
the password that was set previously to unlock.
R1(config)#line con 0
The lock command is used to lock the current session.
The user has to enter a password before unlocking the session.