Lock Command on CISCO Router/Switch

Command

Lock

Use

Allows you to lock your terminal with a one time password.

Syntax

Router>lock

Usage

  1. Before using the Lock command you must first enable it by typing lockable under the console or VTY lines
  2. Type Lock
  3. 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
  4. You will be asked to confirm the password. To regain access to the router type the password you have chosen.

Example

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#
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x