当前位置:网站首页>华为交换机:配置telnet和ssh、web访问
华为交换机:配置telnet和ssh、web访问
2022-07-03 07:41:00 【鹿鸣天涯】
华为配置telnet和ssh访问
一、Telnet登陆配置
1、配置telnet功能及参数
<Huawei>system-view # 进入系统视图
[Huawei]telnet server enable # 配置开启telnet(默认开启)
[Huawei]telnet server port 23 # 配置telnet端口(默认为23)
2、配置telnet用户登陆界面
[Huawei]user-interface vty 0 4 # 进入vty用户界面视图
[Huawei-ui-vty0-4]protocol inbound telnet # 配置用户界面支持Telnet服务
[Huawei-ui-vty0-4]user privilege level 3 # 配置用户级别,3为管理级,最高权限
3、配置验证方式
三种输入的验证方式:
none: 无需验证
password: 用户密码验证
aaa: AAA验证,即用户名和密码验证
我们只需要在这三种验证方式中选择一种即可。一般选择C。
A. 配置不验证密码
[Huawei-ui-vty0-4]authentication-mode none
B. 配置passwd验证方式
[Huawei-ui-vty0-4]authentication-mode password #配置验证方式为password
[Huawei-ui-vty0-4]set authentication password cipher Huawei123 #配置验证密码:Huawei12#$
C. 配置AAA验证
[Huawei-ui-vty0-4] authentication-mode aaa #配置验证模式为aaa
[Huawei-ui-vty0-4] quit #退出用户界面视图
[Huawei] aaa #进入aaa验证
[Huawei-aaa] local-user admin password cipher Huawei12#$ #设置登陆用户名为admin,密码为Huawei12#$
[Huawei-aaa] local-user admin privilege level 3 #配置用户级别
[Huawei-aaa] local-user admin service-type telnet #配置用户登录方式
[Huawei-aaa] quit
用户登陆级别说明
0参观级:网络诊断工具命令(ping、tracert)、从本设备出发访问外部设备的命令(Telnet客户端)、部分display命令等。
1监控级:用于系统维护,包括display等命令。并不是所有display命令都是监控级,比如display current-configuration命令和display saved-configuration命令是3级管理级。
2配置级:业务配置命令,包括路由、各个网络层次的命令,向用户提供直接网络服务。
3~15管理级:用于系统基本运行的命令,对业务提供支撑作用,包括文件系统、FTP、TFTP下载、命令级别设置命令以及用于业务故障诊断的debugging命令等。
4、配置Telnet远程登陆管理端口
远程管理端口可以是物理端口或者逻辑端口
设置物理管理端口
[Huawei] interface MEth 0/0/1
[Huawei-MEth0/0/1] ip address 192.168.1.250 24
[Huawei-MEth0/0/1] quit
设置逻辑端口
[Huawei] vlan 10
...
[Huawei] interface vlanif 10
[Huawei-vlanif10] ip address 192.168.10.1 24
[Huawei-vlanif10] quit
说明:必须保证控制终端能够连接上交换机的vlanif10端口,特别是控制端直接连接此设备时,还需要将与控制端相连的设备端口配上相应的vlan,如控制端连接GigabitEthernet0/0/1来对设备进行远程登陆,需要的配置如下:
[Huawei] interface gigabitethernet0/0/1
[Huawei-GigabitEthernet0/0/1] port link-type access
[Huawei-GigabitEthernet0/0/1] port default vlan 10
[Huawei-GigabitEthernet0/0/1] quit
二、配置SSH远程登陆
1.配置SSH远程登陆界面及其属性
<Huawei> system-view
[Huawei] user-interface vty 0 4
[Huawei-ui-vty0-4] authentication-mode aaa # 配置用户界面验证方式
[Huawei-ui-vty0-4] protocal inbound ssh # 配置用户界面支持SSH
[Huawei-ui-vty0-4] user privilege level 5 # 配置用户界面优先级
[Huawei-ui-vty0-4] quit
2. 配置SSH服务
[Huawei] stelnet server enable #使能STelnet服务
[Huawei] ssh user radmin service-type stelnet #配置SSH用户radmin的服务方式为STelnet
[Huawei] ssh user radmin authentication-type password #配置用户名为radmin(新建)的SSH用户
3. 配置AAA验证所需的用户名和密码
[Huawei] aaa
[Huawei-aaa] local-user radmin password cipher Huawei12#$ #配置用户'radmin'(新建)及其密码'Huawei12#$'
[Huawei-aaa] local-user radmin privilege level 10 #配置用户优先级
[Huawei-aaa] local-user radmin service-type ssh #配置本地用户接入类型为SSH
[Huawei-aaa] quit
说明:当用户界面优先级和用户本身的优先级(AAA视图下的配置)相冲突,以用户优先级为准
配置SSH远程登陆管理端口
管理端口的配置根Telnet服务一致,不再重复。
管理终端登陆
ssh [email protected]
三、web页面登陆配置步骤
配置步骤:
system-view
[HUAWEI]http server enable #开启http服务
[HUAWEI]interface vlanif 1
[HUAWEI-Vlanif1]ip add 192.168.1.1 255.255.255.0 #配置IP地址
[HUAWEI-Vlanif1]quit
[HUAWEI]aaa
[HUAWEI-aaa]local-user huawei password cipher [email protected] #配置用户名huawei和密码[email protected]
[HUAWEI-aaa]local-user huawei privilege level 15 #配置用户名权限
[HUAWEI-aaa]local-user huawei service-type http #配置用户名服务类型
[HUAWEI-aaa]quit
[HUAWEI]quit
save
y
重点华为设备出厂的时候,对web访问的接口做了限制,我们必须查出来哪个接口可以web访问
display current-configuration filter http serve #查询哪个接口允许web访问
#
post-system
http server enable
http server permit interface GigabitEthernet0/0/1 #这个接口可以访问
#
return
解决办法有两种:
undo http server permit interface #删除限制
http server permit interface e0/0/0 #允许你的接口访问web
在这里我想说的是,华为的web界面真的是很差,我用的真机AR1220,不知道新版的怎么样。建议还是用命令把。
原文链接:https://blog.csdn.net/annita2019/article/details/109370995
边栏推荐
- 技术干货|昇思MindSpore初级课程上线:从基本概念到实操,1小时上手!
- 圖像識別與檢測--筆記
- URL programming
- Leetcode 213: looting II
- Introduction of transformation flow
- Common methods of file class
- Analysis of the eighth Blue Bridge Cup single chip microcomputer provincial competition
- Unified handling and interception of exception exceptions of vertx
- Reconnaissance et détection d'images - Notes
- HISAT2 - StringTie - DESeq2 pipeline 进行bulk RNA-seq
猜你喜欢

Analysis of the ninth Blue Bridge Cup single chip microcomputer provincial competition

最全SQL与NoSQL优缺点对比

Es writing fragment process

技术干货 | AlphaFold/ RoseTTAFold开源复现(2)—AlphaFold流程分析和训练构建

Introduction of transformation flow

VMware network mode - bridge, host only, NAT network

Technical dry goods Shengsi mindspire lite1.5 feature release, bringing a new end-to-end AI experience

【LeetCode】2. Valid Parentheses·有效的括号

Comparison of advantages and disadvantages between most complete SQL and NoSQL

Go language foundation ----- 08 ----- interface
随机推荐
项目经验分享:基于昇思MindSpore实现手写汉字识别
Go language foundation ------17 ----- channel creation, read-write, security shutdown, multiplexing select
论文学习——鄱阳湖星子站水位时间序列相似度研究
Robots protocol
Comparison of advantages and disadvantages between most complete SQL and NoSQL
Collector in ES (percentile / base)
昇思MindSpore再升级,深度科学计算的极致创新
PAT甲级 1029 Median
Unified handling and interception of exception exceptions of vertx
Go language foundation ----- 13 ----- file
Technical dry goods | reproduce iccv2021 best paper swing transformer with Shengsi mindspire
Reconnaissance et détection d'images - Notes
Vertx's responsive redis client
Web router of vertx
[set theory] Stirling subset number (Stirling subset number concept | ball model | Stirling subset number recurrence formula | binary relationship refinement relationship of division)
技术干货|百行代码写BERT,昇思MindSpore能力大赏
PDO and SDO concepts
PAT甲级 1031 Hello World for U
Common methods of file class
Technical dry goods | hundred lines of code to write Bert, Shengsi mindspire ability reward