H3C Huawei Ruijie远程管理配置
概述
在配置远程管理之前需要给设备添加一个三层地址且客户端要与网络设备在同一个网段;
如果进行跨网段远程管理,则需要配置一条出口缺省路由。
拓扑结构
H3C远程管理配置
网络配置
管理Vlan:vlan 255
管理地址:192.168.1.254/24
Vlanif接口配置
[H3C] vlan 255
[H3C-vlan253] port Gigabitethernet 1/0/1
[H3C-Vlan-interface255]ip address 192.168.1.254 24
三层接口配置
[H3C] interface GigabitEthernet1/0/1
[H3C-GigabitEthernet1/0/1] port link-mode route
[H3C-GigabitEthernet1/0/1] ip address 192.168.1.254 24
SSH远程管理配置实例
[H3C]local-user admin class manage
[H3C-luser-manage-admin]password simple abc123456.
[H3C-luser-manage-admin]service-type ssh
[H3C-luser-manage-admin]authorization-attribute user-role level-15
[H3C]user-interface vty 0 4
[H3C-line-vty0-4]authentication-mode scheme
[H3C-line-vty0-4]protocol inbound ssh
[H3C-line-vty0-4]user-role level-15
[H3C]ssh server enable
[H3C]ssh user admin service-type stelnet authentication-type password
Telnet远程服务配置实例
[H3C]local-user admin class manage
[H3C-luser-manage-admin]password simple abc123456.
[H3C-luser-manage-admin]service-type telnet
[H3C-luser-manage-admin]authorization-attribute user-role level-15
[H3C]user-interface vty 0 4
[H3C-line-vty0-4]authentication-mode scheme
[H3C-line-vty0-4]protocol inbound telnet
[H3C-line-vty0-4]user-role level-15
[H3C]telnet server enable
Http Https 远程管理配置实例
[H3C]local-user admin class manage
[H3C-luser-manage-admin]password simple abc123456.
[H3C-luser-manage-admin]service-type http https ssh telnet
[H3C-luser-manage-admin]authorization-attribute user-role level-15
[H3C]ip https enable
[H3C]ip http enable
conlose口免密配置
[H3C]line aux 0
[H3C-line-aux0]authentication-mode none
Huawei远程管理配置
网络配置
管理Vlanif:Vlan 255
管理三层接口:192.168.255.254/24
Vlanif接口配置
[Huawei]vlan 255
[Huawei]interface vlan 255
[Huawei-Vlanif255]ip add 192.168.255.254 24
[Huawei-Vlanif255]quit
三层接口配置
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]undo portswitch
[Huawei-GigabitEthernet0/0/1]ip address 192.168.255.254 24
全局配置
在配置远程管理配置前,用户(所有协议)和用户登录接口(http协议除外)必须要配置。
配置用户
[Huawei]aaa
# 设置用户密码
[Huawei-aaa]local-user admin password cipher abc123.
# 用户权限等级15为最高,通常华为设备配置为3
[Huawei-aaa]local-user admin privilege level 15
# 设置用户可以使用的服务
[Huawei-aaa]local-user admin service-type ssh telnet http
配置用户登录接口
[Huawei]user-interface vty 0 4
# 设置用户认证的方式为aaa
[Huawei-ui-vty0-4]authentication-mode aaa
# 设置允许在接口上使用的协议,有telnet和stelnet(ssh)
[Huawei-ui-vty0-4]protocol inbound all
Telnet配置
# 开启telnet服务
[Huawei]telnet server enable
[Huawei]quit
# 登录测试
<Huawei>telnet 127.0.0.1
Trying 127.0.0.1 ...
Press CTRL+K to abort
Connected to 127.0.0.1 ...
Login authentication
Username:admin
Password:
SSH/Stelnet配置
[Huawei]stelnet server enable
Info: Succeeded in starting the Stelnet server.
# 设置ssh用户使用的服务
[Huawei]ssh user admin service-type stelnet
# 设置ssh用户认证方式,这里为密码认证
[Huawei]ssh user admin authentication-type password
# 华为默认没有ssh命令,通过客户端软件进行连接例如xshell、CRT
Http配置
[Huawei]http server enable
# 开启http服务后通过浏览器访问https://192.168.255.254/
conlose免密配置
[Huawei]user-interface console 0
[Huawei-ui-console0]authentication-mode none
Ruijie远程管理配置
网络配置
管理Vlanif:Vlan 255
管理三层接口:192.168.255.254/24
Vlanif接口配置
Ruijie>enable
Password:******
Ruijie#configure terminal
Ruijie(config)#vlan 255
Ruijie(config-vlan)#interface vlan 255
Ruijie(config-if-VLAN 255)#ip address 192.168.255.254 255.255.255.0
三层接口配置
Ruijie(config)#interface gigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)#no switchport
Ruijie(config-if-GigabitEthernet 0/0)#ip add 192.168.255.254 255.255.255.0
全局配置
用户配置
Ruijie(config)#username admin password abc123.
Ruijie(config)#username admin privilege 15
用户接口配置
Ruijie(config)#line vty 0 4
Ruijie(config-line)#login local
Telnet配置
Ruijie(config)#enable service telnet-server
Ruijie(config)#exit
Ruijie#telnet 127.0.0.1
Trying 127.0.0.1, 23...
User Access Verification
Username:admin
Password:*******
SSH配置
Ruijie(config)#enable service ssh-server
# 选择ssh版本
Ruijie(config)#ip ssh version 2
# 生成加密密钥
Ruijie(config)#crypto key generate rsa
HTTP配置
Ruijie(config)#enable service web-server
Ruijie(config)#ip http authentication local
# 开启http服务后通过浏览器访问http://192.168.255.254/
conlose免密配置
# 关闭密文认证
Ruijie(config)#no enable secret
# 关闭密码认证
Ruijie(config)#no enable password