Command
Login
Use
Enables authentication for console connections to router. Contrary to what it may sound like, the no logincommand will actually disable authentication to the console port on the router. This means that anyone will be able to access the router without having to provide a password.
Syntax
Router(config-line)#login
Example
In this example, login is enabled for console access on R2. Notice that a password is also set before using the logincommand.
Copy
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#
R2(config)#line con 0
R2(config-line)#password cisco
R2(config-line)#login
The configuration for the console port is shown with login enabled.
Copy
R2(config-line)#do show run | sec con
Building configuration…
Current configuration : 1460 bytes
control-plane
line con 0
exec-timeout 15 50
privilege level 15
password cisco
logging synchronous
login
If a password is not set before using login, a message is displayed notifying that a password needs to be set before login becomes active.
Copy
R2(config-line)#login
% Login disabled on line 0, until ‘password’ is set