任务 4:配置 VTY,确保任何用户都可以直接远程登录到 R2
步骤 1:先尝试使用 R1 通过 telnet 登录 R2,发现是无法登陆的
R1>telnet 192.168.1.2 Trying 192.168.1.2 ... Open Password required, but none set [Connection to 192.168.1.2 closed by foreign host] R1>
步骤 2:进入 R2 的命令行界面,并进入特权模式
R2>enable R2#configure terminal Enter configuration commands, one per line. End with CNTL/Z. R2(config)#
步骤 3:进入 R2 的 Line vty 0,使用 no login 命令,关闭 VTY 的认证机制,是任何用户 需要进入 VTY0 时,都不用认证直接进入
R2(config)#line vty 0 R2(config-line)#no login R2(config-line)#
步骤 4:再次使用 R1 尝试 telnet 到 R2,发现现在可以成功登录 R2
R1>telnet 192.168.1.2 Trying 192.168.1.2 ... Open R2>
提问:此时用 R3 登录,为什么不可以?
步骤 5:退出 R1 对 R2 的 telnet 登录
R2>exit [Connection to 192.168.1.2 closed by foreign host] R1>