> 文章列表 > 华为telnet连接(无用户名登录和aaa模板登录)

华为telnet连接(无用户名登录和aaa模板登录)

华为telnet连接(无用户名登录和aaa模板登录)

实验拓扑(下载地址)

华为telnet连接(无用户名登录和aaa模板登录)

图 1-1

注:如无特别说明,描述中的 R1 或 SW1 对应拓扑中设备名称末尾数字为 1 的设备,R2 或 SW2 对应拓扑中设备名称末尾数字为 2 的设备,以此类推;另外,同一网段中,IP 地址的主机位为其设备编号,如 R3 的 g0/0 接口若在192.168.1.0/24网段,则其 IP 地址为192.168.1.3/24,以此类推


实验需求

  1. 按照图示配置 IP 地址,

  2. 2在AR1上配置telnet服务,使AR2可以使用telnet远程登录AR1


实验解法

  1. 配置 IP 地址部分

AR1

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sys ar1
[ar1]int g0/0/0
[ar1-GigabitEthernet0/0/0]ip add 192.168.2.2 24

PC2

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn ar2
[ar2]int g0/0/0
[ar2-GigabitEthernet0/0/0]ip add 192.168.1.2 24
[ar2]un in en            //关闭系统通知,要不然会刷屏
Info: Information center is disabled.

2,在AR1上配置telnet服务,使AR2可以使用telnet远程登录AR3,设置登录用户为5人

AR1

[R1]telnet server enable Error: TELNET server has been enabled                    /华为TELNET服务一般默认开启
[R1]user-int vty 0 4                                      /登录人数限制0 1 2 3 4 正好5个
[R1-ui-vty0-4]authentication-mode password 
Please configure the login password (maximum length 16):10                //设置密码长度,最长为16
[R1-ui-vty0-4]set  authentication password cipher yueye                 /设置登录密码为密文方式密码为yueye

3,登录测试

AR2

<r2>telnet 192.168.1.1                                   //要在用户视图下登录Press CTRL_] to quit telnet modeTrying 192.168.1.1 ...Connected to 192.168.1.1 ...
Login authentication 
Password:                                                  //此方法为无用户名登录
<R1>                                           //登录成功后发现设备名称变化

4,补充aaa登录配置

AR1

步骤1:设置AR1的telnet认证方式为aaa

[r1]user-int vty 0 4
[r1-ui-vty0-4]authentication-mode aaa

步骤2:配置aaa登录用户模板应用服务与权限等级

[R1-ui-vty0-4]aaa
[R1-aaa]local-user yueye pas ci 123     //创建用户月夜密码为密文的123
Info: Add a new user.
[R1-aaa]local yueye pr le 15          //配置用户等级为15级
[R1-aaa]loca yueye ser tel               //应用服务为telnet

AR2登录测试(会发现需要用户名称与密码才能登录)