Command
Password
Use
Sets the password for virtual terminal login.
Syntax
Router(config-line)#password
Example
In this example a password is set for vty 0 4 login on R2.
Copy
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#line vty 0 4
R2(config-line)#password cisco
The config is shown with the new password set for vty login.
Copy
R2(config-line)#do show run | sec vty 0 4
line vty 0 4
password cisco
login
transport input telnet ssh
A telnet session is initiated from R3 to R2. Notice that login now requires password.
Copy
R3#telnet 10.2.2.2
Trying 10.2.2.2 … Open
User Access Verification
Password: *****