2、telnet登录(优点可以远程登录配置;验证方式配置简单。缺点数据通过明文传输,安全性不高)
单纯密码验证配置
第一步配置密码:
The device is running!
<Huawei>sys
Enter system view, return user view with Ctrl Z.
[Huawei]sys AR2
[AR2]user-in
[AR2]user-interface vty 0 4
[AR2-ui-vty0-4]user pr
[AR2-ui-vty0-4]user privilege le 15 配置用户权限等级为最高等级
[AR2-ui-vty0-4]set au
[AR2-ui-vty0-4]set authentication pa
[AR2-ui-vty0-4]set authentication password ci 配置验证方式为密码认证
[AR2-ui-vty0-4]set authentication password cipher huawei 配置密码为huawei
[AR2-ui-vty0-4]pr
[AR2-ui-vty0-4]protocol inb
[AR2-ui-vty0-4]protocol inbound telnet 允许telnet协议通过
[AR2-ui-vty0-4]q
[AR2]int g0/0/0
[AR2-GigabitEthernet0/0/0]ip add 192.168.1.1 24 配置接口地址和掩码
Sep 12 2023 10:34:22-08:00 AR2 %IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[AR2-GigabitEthernet0/0/0]q
[AR2]
第二步验证密码:
The device is running!
<Huawei>sys
Enter system view, return user view with Ctrl Z.
[Huawei]sys AR1
[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 192.168.1.2 24 配置接口地址和掩码
Sep 12 2023 10:35:16-08:00 AR1 %IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[AR1-GigabitEthernet0/0/0]q
[AR1]q
<AR1>telnet 192.168.1.1 通过telnet远程AR2
Press CTRL_] to quit telnet mode
Trying 192.168.1.1 ...
Connected to 192.168.1.1 ...
Login authentication
Password: 输入密码huawei
<AR2>
AAA验证配置:
第一步配置密码:
<Huawei>sys
Enter system view, return user view with Ctrl Z.
[Huawei]sy AR2 改名
[AR2]int g0/0/0 进入接口g0/0/0
[AR2-GigabitEthernet0/0/0]ip add 192.168.1.1 24 配置接口地址和掩码
[AR2-GigabitEthernet0/0/0]q
[AR2]aaa 进入aaa配置模式
[AR2-aaa]loc
[AR2-aaa]local-user ceshi pa 新建本地用户ceshi
[AR2-aaa]local-user ceshi password ci 设置密码为密文
[AR2-aaa]local-user ceshi password cipher huawei pr 设置密码为huawei
[AR2-aaa]local-user ceshi password cipher huawei privilege le
[AR2-aaa]local-user ceshi password cipher huawei privilege level 15 设置当前用户命令等级为最高级
Info: Add a new user.
[AR2-aaa]local
[AR2-aaa]local-user ceshi ser
[AR2-aaa]local-user ceshi service-type telnet 设置新建用户ceshi将对telnet协议生效
[AR2-aaa]q
[AR2]user-in
[AR2]user-interface vty 0 4 进入虚拟接口0-4共五个接口
[AR2-ui-vty0-4]au
[AR2-ui-vty0-4]authentication-mode aaa 配置接口验证模式为aaa验证
[AR2-ui-vty0-4]pr
[AR2-ui-vty0-4]protocol in
[AR2-ui-vty0-4]protocol inbound telnet 配置当前接口可以通过telnet协议
[AR2-ui-vty0-4]q
[AR2]
第二步验证密码:
<Huawei>sys
Enter system view, return user view with Ctrl Z.
[Huawei]sy AR1
[AR1]int g0/0/0 进入接口g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 192.168.1.2 24 配置接口地址和掩码
[AR1-GigabitEthernet0/0/0]q
[AR1]q
<AR1>telnet 192.168.1.1 在用户模式下测试telnet AR2
Press CTRL_] to quit telnet mode
Trying 192.168.1.1 ...
Connected to 192.168.1.1 ...
Login authentication
Username:ceshi 输入用户名ceshi
Password: 输入密码huawei(输入密码时,输入的密码不显示)
<AR2> 成功远程连接到AR2的设备