Cisco IOS configuration basics: Which command context is used to set the Telnet or SSH line password on a router for remote virtual terminal access?

Difficulty: Easy

Correct Answer: line vty 0 4

Explanation:


Introduction / Context:
Remote management of Cisco routers and switches typically uses virtual terminal lines (VTYs) for Telnet or SSH sessions. Correctly entering line configuration mode is required to set passwords and access control.



Given Data / Assumptions:

  • We want to configure login and password for remote sessions.
  • Virtual terminal lines are addressed as vty 0 4 by default on many devices.
  • Console and auxiliary lines are distinct from VTY lines.


Concept / Approach:
To set the password for remote access, enter global configuration mode and then the line configuration for vty 0 4. Inside that context, commands such as password, login, and transport input ssh or telnet are applied. Console and aux contexts do not control VTY authentication.



Step-by-Step Solution:

Enter configuration mode: configure terminal.Enter VTY line context: line vty 0 4.Set password and enable login; optionally configure transport and access-class.


Verification / Alternative check:
show running-config confirms the presence of a line vty 0 4 section with the configured password or AAA method lists.



Why Other Options Are Wrong:

  • line telnet 0 4 is not a valid IOS context.
  • line aux 0 4 configures the auxiliary port, not remote VTY access.
  • line con 0 configures the console line only.


Common Pitfalls:
Forgetting to enable login under the VTY lines; not using transport input ssh to disable insecure Telnet on production devices; relying on line passwords instead of AAA with local or remote user databases.



Final Answer:
line vty 0 4

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion