Difficulty: Easy
Correct Answer: Router(config)#line vty 0 4
Explanation:
Introduction / Context:
Virtual terminal (VTY) lines on Cisco IOS devices are used for remote administrative sessions such as Telnet or Secure Shell (SSH). Knowing how to enter the correct configuration submode to apply passwords, login methods, and transport protocols to all default VTY lines (0–4) is essential for secure router access control.
Given Data / Assumptions:
Concept / Approach:
To configure multiple VTY lines at once, you enter global configuration mode and then the line submode for the range. The canonical syntax is line vty 0 4 from Router(config)#. Inside that submode you can set password, login, transport input ssh, and apply access-class filters.
Step-by-Step Solution:
Verification / Alternative check:
Use show running-config | section line vty to confirm that the configuration applied to lines 0–4. Attempt a Telnet/SSH session to validate access behavior matches policy.
Why Other Options Are Wrong:
Router#line vty 0 4 shows the wrong prompt; you must be in global config, not user/privileged EXEC.
Router(config-if)#line console 0 configures the console line, not VTY.
Router(config)#line vty all is not valid IOS syntax; specify the numeric range.
Common Pitfalls:
Forgetting to include the entire range (0–4), leaving some lines unprotected; configuring Telnet without SSH; omitting login or AAA, which can lock out access or weaken security.
Final Answer:
Router(config)#line vty 0 4
Discussion & Comments