一、配置telnet
交换机的配置:
[Huawei]sys SW1
[SW1]telnet server enable 开启telnet服务
[SW1]user-interface vty 0 4 进入配置端口
[SW1-ui-vty0-4]authentication-mode aaa 开启AAA认证
[SW1-ui-vty0-4]aaa 进入AAA认证
[SW1-aaa]local-user xiaolin password cipher 12345 设置用户密码
[SW1-aaa]local-user xiaolin service-type telnet 开启服务
[SW1-aaa]local-user xiaolin privilege level 15 设置等级
[SW1-aaa]q
[SW1]int vlanif1
[SW1-Vlanif1]ip add 192.168.183.254 24 配置交换机地址
测试物理机是否ping通交换机
远程连接
二、SSH远程连接
交换机配置:
[Huawei]sys SW1
[SW1]stelnet server enable 开启SSH服务
[SW1]ssh authentication-type default password
[SW1]user-interface vty 0 4
[SW1-ui-vty0-4]authentication-mode aaa 启用AAA
[SW1-ui-vty0-4]aaa
[SW1-aaa]local-user xiaolin password cipher 1234 配置用户密码
[SW1-aaa]local-user xiaolin service-type ssh 开启服务
[SW1-aaa]local-user xiaolin privilege level 3 配置权限
[SW1-aaa]q
[SW1]rsa local-key-pair create
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
it will take a few minutes.
Input the bits in the modulus[default = 512]:1024
Generating keys...
........................++++++
..........++++++
..++++++++
.++++++++
[SW1]int vlanif1
[SW1-Vlanif1]ip add 192.168.183.254 24 设置交换机IP地址
[SW1-Vlanif1]q
[SW1]user-interface vty 0 4
[SW1-ui-vty0-4]protocol inbound ssh 配置VType 身份证为AAA认证,允许用户以SSH方式进入
[SW1-ui-vty0-4]q
[SW1]