CISCO CCNA 200-301 Q60

You need to set the Telnet password to “john” on a Cisco router. Which set of commands would you use?

A.
Router(config)#line vty 0 4
Router(config-line)#login
Router(config-line)#password john

B.
Router(config)#line con 0
Router(config-line)#login
Router(config-line)#password john

C.
Router(config)#line vty 0 4
Router(config-line)#login
Router(config-line)#enable secret john

D.
Router(config)#line con 0
Router(config-line)#login
Router(config-line)#enable password john

Correct Answer: A

Explanation:
The set of commands which would be used to configure the Telnet password to “john” on a Cisco router is:

Router(config)#line vty 0 4 Router(config-line)#login Router(config-line)#password john

The line vty command is used to configure the router to enable Telnet access. By using this command, the router can be configured to accept one or more Telnet sessions.

The login and password parameters are the line configuration commands used to configure the password. The password command specifies the password and the login command instructs the router to require the password. By default, the login parameter is present in the configuration of the VTY lines. Because its presence indicates that a password is required for connecting to the VTY lines, if a password has not been configured on the VTY lines, a connection cannot be made. If an attempt were made to connect to the VTY line with the login parameter in effect and no password present, the following error message would be generated:

Router2# telnet 10.3.1.1
Trying 10.3.1.1Open

Password Required, but none set
[Connection to 10.3.1.1 closed by foreign host]
Router2#