1、无认证
服务器配置telnet服务
Telnet server enable 开启服务
Line vty 0 4 开启远程虚拟终端并配置接入人数
Authentication-mode none 认证方式为无认证
2、密码认证
server:line vty 0 4
authentication-mode password
set authentication password simple qwe123
3、用户名密码
local-user admin 创建本地用户
Password simple huawei@123 该用户的密码为
service-type telnet 登陆类型
Authorization-attribute user-role network-admin 用户登陆设置为管理员
line vty 0 9
authentication-mode scheme 认证方式必须为aaa
4、ssh登陆
(1) 配置SSH服务器
# 生成RSA密钥对。
<Switch> system-view
[Switch] public-key local create rsa
# 生成DSA密钥对。
[Switch] public-key local create dsa
# 启动SSH服务器。
[Switch] ssh server enable
# 配置VLAN接口1的IP地址,客户端将通过该地址连接SSH服务器。
[Switch] interface vlan-interface 1
[Switch-Vlan-interface1] ip address 192.168.1.40 255.255.255.0
[Switch-Vlan-interface1] quit
# 设置SSH客户端登录用户界面的认证方式为AAA认证。
[Switch] user-interface vty 0 4
[Switch-ui-vty0-4] authentication-mode scheme
# 设置Switch上远程用户登录协议为SSH。
[Switch-ui-vty0-4] protocol inbound ssh
[Switch-ui-vty0-4] quit
# 创建本地用户client001,并设置用户访问的命令级别为3。
[Switch] local-user client001
[Switch-luser-client001] password simple aabbcc
[Switch-luser-client001] service-type ssh
[Switch-luser-client001] authorization-attribute level 3
[Switch-luser-client001] quit