1、创建本地密钥对
system-view
[Quidway]rsa local-key-pair create
The key name will be: Core-SW_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 = 2048]:
Generating keys…
..+++++
……………………++
….++++
………..++
2、检查是否存在SSH user(可跳过),系统提示没有SSH user 存在
[Quidway]dis ssh user-information
Info: No SSH user exists.
3、创建SSH user
[Quidway]ssh user adminssh # 将 adminssh用户变成ssh用户,可以直接敲第二行命令
[Quidway]ssh user adminssh authentication-type password #认证模式为密码认证
[Quidway]ssh user adminssh service-type stelnet # 服务类型为stelnet,即SSH
4、创建用户(也可创建华为用户,Telnet用户)
[Quidway]aaa
[Quidway-aaa]local-user adminssh password cipher bw@123456 # bw@123456处为你想要设置的密码
Info: Add a new user.
[Quidway-aaa]local-user test privilege level 3 用户level最高到15
[Quidway-aaa]local-user test service-type ssh # 开启该用户允许使用SSH访问设备的权限
5、启用SSH(stelnet)服务
[Quidway]stelnet server enable
Info: Succeeded in starting the Stelnet server.
6、配置vty界面支持的登录协议
[Quidway]user-interface vty 0 4
[Quidway-ui-vty0-4]authentication-mode aaa
[Quidway-ui-vty0-4]protocol inbound ssh
quit
7、路由
system-view
interface Vlanif 1
ip address 172.16.72.254 255.255.255.0
interface GigabitEthernet0/0/1
ip route-static 0.0.0.0 0.0.0.0 172.16.72.1
quit
exit
8、华为交换机初始化
reset saved-configuration
y
reboot
先N,后Y