第2个回答 2018-05-29
<Huawei>sys
[Huawei]undo info en
Info: Information center is disabled.
[Huawei]sysname sw1
[sw1]user-interface vty 0 4
[sw1-ui-vty0-4]authentication-mode aaa
[sw1-ui-vty0-4]protocol inbound ssh
[sw1-ui-vty0-4]q
[sw1]aaa
[sw1-aaa]local-user haha password simple kkk
Info: Add a new user.
[sw1-aaa]local-user haha service-type ssh
[sw1-aaa]local-user haha privilege level 3
[sw1-aaa]q
[sw1]ssh user haha authentication-type password
Info: Succeeded in adding a new SSH user.
[sw1]ssh user haha service-type stelnet
[sw1]stelnet server enable
Info: Succeeded in starting the Stelnet server.
[sw1]rsa 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]:512
Generating keys...
..++++++++++++
......++++++++++++
.............................................++++++++
...........++++++++
[sw1]interface vlanif 1
[sw1-Vlanif1]ip address 192.168.1.1 24
在电脑上用PuTTY等客户端登录即可。