华为交换机配置 SSH

PPPerryPan2024-03-08techHuaweiNetworking

远程连接

创建 SSH 密钥对

[Huawei]rsa local-key-pair create 
The key name will be: Huawei_Host
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]:
Generating keys...
...............++++++++++++
............++++++++++++
.................++++++++
.........++++++++

认证、协议配置

[Huawei]user-interface vty 0 4
[Huawei-ui-vty0-4]authentication-mode aaa
[Huawei-ui-vty0-4]protocol inbound ssh 
[Huawei-ui-vty0-4]dis this
#
user-interface con 0
user-interface vty 0 4
 authentication-mode aaa
 protocol inbound ssh
#
return

创建帐户

[Huawei]aaa
[Huawei-aaa]local-user admin password cipher 123456
[Huawei-aaa]local-user admin service-type ssh
[Huawei-aaa]local-user admin privilege level 15

服务启动

[Huawei]stelnet server enable 
Info: Succeeded in starting the Stelnet server.
[Huawei]ssh user admin authentication-type password
Info: Succeeded in adding a new SSH user.
[Huawei]ssh user admin service-type all
Last Updated 4/13/2026, 2:35:35 PM
ON THIS PAGE