【设备型号】华为switch-S5700s
————1:
[SW1] rsa/dsa local-key-pair create #创建本地密钥对
The key name will be: SW1_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...
.................++++++++++++
......................++++++++++++
..............++++++++
.........++++++++
————2:配置VTY用户,只能用SSH进入
[sw1]user-interface vty 0 4
[sw1-ui-vty0-4]authentication-mode aaa
[sw1-ui-vty0-4]protocol inbound ssh
[sw1-ui-vty0-4]quit
—————3:创建SSH用户及密码
#aaa
#local-user NAME password cipher明文/irreversible-cipher密文 密码
#local-user NAME privilege level 3
#local-user NAME service-type ssh
#quit
—————4.配置ssh用户的认证方式和服务方式
[huawei] ssh user NAME authentication-type password
[huawei] ssh user NAME service-type {sftp | stelnet | all }
[huawei] stelnet server enable #打开ssh服务