Command
Lockable
Use
Enables vty session locking.
Syntax
Router(config-line)#lockable
Usage
- 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. Type the password into the prompt to confirm it.
- To regain access to the router, type the password you have chosen.
Example
In this example the vty line is set to lockable. Afterwards, the user issues the lockcommand to lock his current session. When using lockto 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.
Copy
R1(config)#line vty 0 4
R1(config-line)#lockable
R1(config-line)#^Z
R1#
The lock command is used to lock the current session.
Copy
R1#lock
Password: ****
Again: ****
Locked
The user has to enter a password before unlocking the session.
Copy
Password: ****
R1#