暂无评论
1<H3C> system-view # 进入系统视图
2[H3C] line console 0 # 进入 Console 0 用户界面
3[H3C-line-console0] authentication-mode password # 设置认证方式为密码认证
4[H3C-line-console0] set authentication password simple YourConsolePassword # 设置明文密码(将YourConsolePassword替换为你想要的密码)
5[H3C-line-console0] user-role network-admin # 赋予该登录用户最高管理权限
6[H3C-line-console0] quit1# 1. 生成本地 RSA 密钥对(SSH 加密的基础,必须配置)
2[H3C] public-key local create rsa
3
4# 2. 开启 SSH 服务器功能
5[H3C] ssh server enable
6
7# 3. 创建用于 SSH 登录的本地用户
8[H3C] local-user admin class manage # 创建用户名为 admin 的管理类用户(将admin替换为你想要的用户名)
9[H3C-luser-manage-admin] password simple YourSSHPassword # 设置该用户的明文密码
10[H3C-luser-manage-admin] authorization-attribute user-role network-admin # 赋予该用户最高管理权限
11[H3C-luser-manage-admin] service-type ssh # 允许该用户使用 SSH 服务
12[H3C-luser-manage-admin] quit
13
14# 4. 配置 VTY(远程登录)用户界面
15[H3C] user-interface vty 0 4 # 进入 VTY 0 到 4 用户界面(允许 5 个用户同时远程登录)
16[H3C-line-vty0-4] authentication-mode scheme # 设置认证模式为 scheme(即使用上面创建的本地用户名和密码进行认证)
17[H3C-line-vty0-4] protocol inbound ssh # 限制 VTY 线路只允许 SSH 协议接入(出于安全考虑,建议禁用 Telnet)
18[H3C-line-vty0-4] quit1[H3C] interface Vlan-interface 1 # 进入默认的管理 VLAN 1 接口(也可以新建其他 VLAN)
2[H3C-Vlan-interface1] ip address 192.168.1.100 24 # 配置 IP 地址和子网掩码(请根据实际网络规划修改)
3[H3C-Vlan-interface1] quitsave 命令保存配置,防止设备重启后配置丢失。之后你就可以使用 SSH 客户端(如 PuTTY、SecureCRT 等),输入刚刚配置的管理 IP、用户名(admin)和密码远程登录这台交换机了。暂无评论
下面给你一套直接可复制、完整可用的 H3C S3600V2 配置:包含 Console 口密码 + SSH 远程登录(带用户名密码),适合 V5 平台(S3600V2 属于 V5)。
一、Console 口密码配置(本地登录密码)
bash
运行
# 进入系统视图
<H3C> system-view
# 进入 Console(AUX 0)用户线
[H3C] user-interface aux 0
# 认证模式为 password(只需密码,不需用户名)
[H3C-ui-aux0] authentication-mode password
# 设置密码(simple=明文显示,cipher=密文,推荐 cipher)
[H3C-ui-aux0] set authentication password cipher 你的密码123
# 登录后权限级别(3=最高管理级)
[H3C-ui-aux0] user privilege level 3
[H3C-ui-aux0] quit
验证:下次用 Console 登录,会提示输入密码。
二、SSH 远程登录配置(用户名 + 密码)
1. 必备:配置管理 IP(示例)
bash
运行
# 假设用 VLAN 1 做管理
[H3C] interface Vlan-interface 1
[H3C-Vlan-interface1] ip address 192.168.1.1 255.255.255.0
[H3C-Vlan-interface1] quit
# 开启 SSH 服务
[H3C] stelnet server enable
2. 生成 RSA 密钥(SSH 必须)
bash
运行
[H3C] public-key local create rsa
# 直接回车确认,自动生成
3. 创建 SSH 登录用户(带密码 + 权限)
bash
运行
# 创建用户 admin,密码 admin@123,服务类型 ssh,权限 15(最高)
[H3C] local-user admin
[H3C-luser-admin] password cipher admin@123
[H3C-luser-admin] service-type ssh
[H3C-luser-admin] authorization-attribute level 15
[H3C-luser-admin] quit
4. VTY 线路只允许 SSH、使用账号密码认证
bash
运行
# 进入 VTY 0~63(所有虚拟终端)
[H3C] user-interface vty 0 63
# 认证模式:scheme(使用 local-user 用户名密码)
[H3C-ui-vty0-63] authentication-mode scheme
# 只允许 SSH,禁止 telnet
[H3C-ui-vty0-63] protocol inbound ssh
[H3C-ui-vty0-63] quit
三、保存配置(必须)
bash
运行
[H3C] save
四、查看配置是否生效
bash
运行
# 查看 Console 认证
display user-interface aux 0
# 查看 VTY 与 SSH
display user-interface vty 0 63
display stelnet server
display local-user
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论