H3C交换机配置SSH远程

一.设备作为 SSH 服务器端设置
system-view // 进入系统视图
[H3C]public-key local create rsa // 生成 RSA 密钥对
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:
Generating Keys...
++++++++++++++++++++++++++++++++++++++
+++++++++++
+++++++++++++
+++

生成 DSA 密钥对。

[H3C]public-key local create dsa // 生成 DSA 密钥对
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:
Generating Keys...
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++
+++++++++++++++++++++++++++++++*+++++++++++++
二.启动 SSH 服务器
[H3C]ssh server enable // 启动 SSH 服务器
三.设置 SSH 客户端登录用户界面的认证方式为 scheme 方式
[H3C]line vty 0 4 // 进入 VTY 0 ~ 4 用户界面视图
[H3C-line-vty0-4]authentication-mode scheme // 认证方式为 scheme 用户名 + 密码的方式
[H3C-line-vty0-4]protocol inbound ssh // 设置远程用户登录协议为 SSH
[H3C-line-vty0-4]quit // 退出当前视图
四.创建本地用户,密码,并设置用户访问的命令级别为 leve15
[H3C]local-user ABC// 创建本地用户 ABC
[H3C-luser-ABC]password simple 123456 // 密码为 123456
[H3C-luser-ABC]service-type ssh // 服务类型为 ssh
[H3C-luser-ABC]authorization-attribute user-role level-15 // 权限级别为管理员权限
[H3C-luser-ABC]quit // 退出当前视图
五.保存配置
[H3C]save force // 保存配置

posted @ 2026-02-13 15:44  MYQF晓星尘  阅读(5)  评论(0)    收藏  举报