- A+
连接交换机
配置cloud,添加UDP端口和网卡

拉一台交换机连接cloud

打开交换机进行配置
<Huawei>undo terminal monitor
<Huawei>system-view
[Huawei]interface Vlanif 1
[Huawei-Vlanif1]ip address 192.168.56.100 24
[Huawei-Vlanif1]quit
[Huawei]user-interface console 0
[Huawei-ui-console0]authentication-mode password
[Huawei-ui-console0]quit
[Huawei]stelnet server enable
[Huawei]ssh authentication-type default password
[Huawei]aaa
[Huawei-aaa]local-user xxx password cipher xxx.com
[Huawei-aaa]local-user xxx service-type ssh
[Huawei-aaa]local-user xxx privilege level 3
[Huawei-aaa]quit
[Huawei]rsa local-key-pair create //默认回车
[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
[Huawei]quit
<Huawei>save //按y保存
命令解释
undo terminal monitor //关闭信息提示
system-view //进入系统视图
interface Vlanif 1 //进入VLAN1接口配置
ip address 192.168.56.100 24 //配置IP地址
quit //退出VLAN1接口
user-interface console 0 //进入 console 接口
authentication-mode password //设置控制台接口的认证模式为密码认证
stelnet server enable //启用远程服务
ssh authentication-type default password //设置SSH的默认认证类型为密码认证
aaa //进入AAA配置模式
local-user xxx password cipher xxx.com //创建本地用户xxx,并设置其密码为xxx.com
local-user xxx service-type ssh //设置本地用户xxx的服务类型为SSH,用户可以通过SSH登录
local-user xxx privilege level 3 //设置本地用户xxx的权限级别为3,允许执行特定级别的命令
quit //退出
rsa local-key-pair create //创建RSA本地密钥对,用于SSH加密连接,默认回车表示使用默认参数
user-interface vty 0 4 //设置允许登录用户数量,当前设为5个
authentication-mode aaa //设置远程连接的认证模式为AAA认证
protocol inbound ssh //设置用户只允许SSH协议的入站连接
打开xshell连接交换机


连接成功

连接路由器

<Huawei>undo terminal monitor
<Huawei>system-view
[Huawei]stelnet server enable
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.56.200 24
[Huawei-GigabitEthernet0/0/0]quit
[Huawei]aaa
[Huawei-aaa]local-user xxx password cipher xxx.com
[Huawei-aaa]local-user xxx service-type ssh
[Huawei-aaa]local-user xxx privilege level 3
[Huawei-aaa]quit
[Huawei]rsa local-key-pair create //这里选择y确认替换,默认回车
[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
[Huawei]quit
<Huawei>save //按y保存