Topology
1. Configure IP
<Huawei>sys
[Huawei]sys SW1
[SW1]un in en
[SW1]vlan 137
[SW1-vlan137]int e0/0/1
[SW1-Ethernet0/0/1]p l a
[SW1-Ethernet0/0/1]p d v 137
[SW1-Ethernet0/0/1]int vlanif 137
[SW1-Vlanif137]ip addr 192.168.137.10 24
[SW1-Vlanif137]quit
2. Enable stelnet permission, here refers to ssh
[SW1]stelnet server enable
3. Create an ssh user named admin
# 创建用户
[SW1]ssh user admin
# 认证方式为密码
[SW1]ssh user admin authentication-type password
# 服务类型为ssh
[SW1]ssh user admin service-type stelnet
4. Enter the aaa mode to configure users
# 进入aaa模式
[SW1]aaa
# 配置密码为 Admin@123
[SW1-aaa]local-user admin password cipher Admin@123
# 配置用户权限 15是最高
[SW1-aaa]local-user admin privilege level 15
# 允许用户ssh访问权限
[SW1-aaa]local-user admin service-type ssh
[SW1-aaa]quit
5. Configure the login protocol supported by the vty interface
[SW1]user-interface vty 0 4
# 认证为aaa
[SW1-ui-vty0-4]authentication-mode aaa
# 登陆协议为ssh
[SW1-ui-vty0-4]protocol inbound ssh
6. Xshell authentication login
Connecting to 192.168.137.10:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
WARNING! The remote SSH server rejected X11 forwarding request.
Info: The max number of VTY users is 5, and the number
of current VTY users on line is 1.
The current login time is 2023-01-11 17:20:44.
<SW1>