Command
Login
Use
Enables authentication for virtual terminal connections to router. Contrary to what it may sound like, using the no login command will actually disabled authentication to the vty line. This means that a user will not be prompted for a password when trying to log in to the virtual terminal.
Syntax
Router(config-line)#login
Example
In this example, login is enabled for virtual terminal access on R2. Notice that a password is also set before using the login command.
R2#conf t |
The configuration for vty 0 4 is shown with login enabled.
R2(config-line)#do show run | sec vty |
A telnet session is initiated from R3 to R2. A prompt is shown asking for the password that was just set.
R3#telnet 10.2.2.2 Trying 10.2.2.2 … OpenUser Access Verification Password: ***** |
Here’s another example when using no login for vty 0 4.
R2#conf t |
The running config is shown for vty 0 4, with no login. Also note that the password is still set, even though login isn’t.
R2(config-line)#do show run | sec vty |
A telnet session is initiated from R3 to R2. Notice that, this time, no prompt is shown asking for a password.
R3#telnet 10.2.2.2 Trying 10.2.2.2 … OpenR2> |