淘先锋技术网

首页 1 2 3 4 5 6 7

使用串口和网口转接线连接电脑和交换机,使用PuTTY通过串口连接交换机

# 生成 RSA 密钥对
<H3C>system-view
[H3C] public-key local create rsa
# 生成 DSA 密钥对
[H3C] public-key local create dsa
# 生成 ECDSA 密钥对
[H3C] public-key local create ecdsa secp256r1

# 使能 SSH 服务器功能
[H3C]ssh server enable

# 创建 VLAN 70,并将 GigabitEthernet1/0/2 加入 VLAN 70
[H3C]vlan 70
[H3C-vlan70]port GigabitEthernet1/0/2
[H3C-vlan70]quit

# 配置 VLAN 接口 70 的 IP 地址,客户端将通过该地址连接 SSH 服务器进行后续网络配置
[H3C]interface vlan-interface 70
[H3C-Vlan-interface70]ip address 192.168.70.69 255.255.255.0
[H3C-Vlan-interface70]quit

# 设置 SSH客户端登录用户界面的认证方式为 scheme
[H3C]line vty 0 63
[H3C-line-vty0-63]authentication-mode scheme
[H3C-line-vty0-63]quit

# 创建本地用户 admin,并设置用户密码、服务类型和用户角色
[H3C]local-user admin class manage
New local user added.
[H3C-luser-manage-admin]password simple aaAA1122
[H3C-luser-manage-admin]service-type ssh
[H3C-luser-manage-admin]authorization-attribute user-role network-admin
[H3C-luser-manage-admin]quit

转载于:https://my.oschina.net/houor/blog/3084324