<H3C><H3C>sys
<H3C>system-view
System View:return to User View with Ctrl+Z.[H3C]public-key local create rsa
//在用户用ssh登录交换机时,交换机对要登录的用户使用的密码对其进行身份验证,生成rsa密码对
The range of public key modulus is (512~2048).
If the key modulus is greater than 512, it will take a few minutes.
Press CTRL+C to abort.
Input the modulus length [default=1024]:
Generating Keys....
Create the key pair successfully.[H3C]int GigabitEthernet 0/0[H3C-GigabitEthernet0/0]ip address 192.168.0.25424//给0/0端口配置IP地址[H3C-GigabitEthernet0/0]quit
[H3C]ssh server enable
//开启ssh服务[H3C]line vty 04//配置完全攻略[H3C-line-vty0-4]authentication-mode scheme
[H3C-line-vty0-4]protocol inbound ssh
[H3C-line-vty0-4]quit
[H3C]local-user sshlient
New local user added.//设置账号为sshlinent[H3C-luser-manage-sshlient]password simple abc
//设置密码为abc[H3C-luser-manage-sshlient]service-type ssh
[H3C-luser-manage-sshlient]authorization-attribute user-role network-admin
[H3C-luser-manage-sshlient]quit
[H3C]%Mar 411:05:20:5392020 H3C SSHS/6/SSHS_LOG: Accepted password for sshlient from 192.168.0.1 port 52550.%Mar 411:05:21:5592020 H3C SSHS/6/SSHS_CONNECT: SSH user sshlient (IP:192.168.0.1) connected to the server successfully.%Mar 411:05:21:6382020 H3C SHELL/5/SHELL_LOGIN: sshlient logged in from 192.168.0.1.