华为交换配置SSH登录

生成本地密钥对

<Huawei>sys
[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]:1024
Generating keys...
............................++++++
...++++++
..++++++++
......++++++++

配置 VTY 用户界面

[Huawei]user-interface vty 0 4
[Huawei-ui-vty0-4]authentication-mode aaa
[Huawei-ui-vty0-4]protocol inbound ssh
[Huawei-ui-vty0-4]quit

创建 SSH 用户,并配置用户的认证方式为:password

[Huawei]ssh user shxke authentication-type password

配置 SSH 用户及密码

[Huawei]aaa
[Huawei-aaa]local-user shxke password cipher shxke
Info: Add a new user.
[Huawei-aaa]local-user shxke privilege level 3
[Huawei-aaa]local-user shxke service-type ssh
[Huawei-aaa]quit

开启 STelent 功能,并配置用户的服务类型为 STelnet

[Huawei]stelnet server enable 
Info: Succeeded in starting the Stelnet server.
[Huawei]ssh user shxke service-type stelnet

end