1、进入到系统表示图
<H3C>system-view
2、配置交换机的管理地址
[H3C]interface Vlan-interface 1 #默认使用vlan1,可根据需求来创建VLAN
[H3C-Vlan-interface1]ip address 192.168.56.2 255.255.255.0 #此处根据需求的IP地址规划进行填写
3、使用以下命令查看交换机地址是否配置成功
[H3C-Vlan-interface1]display ip interface brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP address/Mask VPN instance Description
MGE0/0/0 down down -- -- --
Vlan1 up up 192.168.56.2/24 -- --
4、退出接口视图
[H3C-Vlan-interface1]quit
5、添加交换机内的管理用户以及密码
[H3C]local-user admin class manage #创建admin用户
New local user added.
[H3C-luser-manage-admin]password simple Huawei@123 #创建admin的密码为Huawei@123
[H3C-luser-manage-admin]service-type ssh terminal #设置服务类型为ssh和terminal两种登陆方式
[H3C-luser-manage-admin]authorization-attribute user-role level-15 #设置最高登录最高权限为15
[H3C-luser-manage-admin]quit #退出到系统视图
6、打开SSH远程服务,并配置认证方式(0-8 为ssh)
[H3C]ssh server enable #打开SSH远程服务
[H3C]user-interface vty 0 8 #ssh使用0-8号终端路线登录
[H3C-line-vty0-8]authentication-mode scheme #使用账户和密码的方式登录(也就是AAA认证)
[H3C-line-vty0-8]user-role level-15 #设置最高权限登录
[H3C-line-vty0-8]user-role network-admin
[H3C-line-vty0-8]protocol inbound ssh #允许SSH协议接入
7、使用网线插到交换机的随便一个端口,并配置hosts主机的IP地址为192.168.56.X /24,打开WIN+R,输入cmd,通过一下命令远程到交换机即可
ssh [email protected]
若提示一下回显,表示配置SSH,并登陆成功
C:\Users\yang.li>ssh [email protected]
The authenticity of host '192.168.56.2 (192.168.56.2)' can't be established.
RSA key fingerprint is SHA256:7o1m+Q0sognSUAvN49zwTUNp9SWod1G0kKHScBy5Xz8.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.56.2' (RSA) to the list of known hosts.
[email protected]'s password:
******************************************************************************
* Copyright (c) 2004-2022 New H3C Technologies Co., Ltd. All rights reserved.*
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<H3C>
8、温馨提示:配置完成请记得保存命令,不然白忙活一场。
版权归原作者 玖珣 所有, 如有侵权,请联系我们删除。