华为CE交换机 Baseline配置(ssh、clock、ntp)

ssh

shell 复制代码
<HUAWEI>system-view //进入系统视图。

[~HUAWEI]stelnet server enable //开启Stelnet服务功能。
Info: Succeeded in starting the Stelnet server.

[*HUAWEI]rsa local-key-pair create //在服务器端生成本地密钥对。
The key name will be: expert_Host
The range of public key size is (512 ~ 2048).
NOTE: Key pair generation will take a short while.
Input the bits in the modulus [default = 2048]:2048 //主机密钥的位数为2048位。

[*HUAWEI]user-interface vty 0 4 //进入VTY用户界面视图。
[*HUAWEI-ui-vty0-4]authentication-mode aaa //配置VTY用户界面的认证方式为AAA。
[*HUAWEI-ui-vty0-4]protocol inbound ssh //配置VTY用户界面支持SSH协议。
[*HUAWEI-ui-vty0-4]quit //退出当前操作视图。

[*HUAWEI]aaa //进入AAA视图。
[*HUAWEI-aaa]local-user expert password irreversible-cipher Changeme_123 //配置本地用户名和密码,expert为用户名,Changeme_123为密码。
Info: A new user is added.
[*HUAWEI-aaa]local-user expert level ? //查询用户级别,对于V100R006C00之前版本的交换机,level的范围为0~15;
  INTEGER<0-3>  Value    //对于V100R006C00及之后版本的交换机,当存在command-privilege level配置时,level的范围是0~15,当不存在command-privilege level配置时,level的范围是0~3。
[*HUAWEI-aaa]local-user expert level 3 //配置本地用户expert的用户优先级为管理级用户(即上一步命令中查询出的最大值)。
[*HUAWEI-aaa]local-user expert service-type ssh //配置本地用户的接入类型为SSH。
[*HUAWEI-aaa]quit //退出当前操作视图。

[*HUAWEI]ssh user expert authentication-type password //配置SSH用户的认证方式为密码认证。
Info: Succeeded in adding a new SSH user.
[*HUAWEI]ssh user expert service-type stelnet //配置SSH用户expert的服务方式为Stelnet。

[*HUAWEI]commit //提交配置。

clock

shell 复制代码
<HUAWEI>clock timezone BJ add 08:00:00  #设置时区为北京时间。
<HUAWEI>clock datetime 0:0:0 2024-10-22 #设置日期为0:0:0 2024-10-22。
<HUAWEI>save #保存配置

ntp

ntp server无需认证

shell 复制代码
<HUAWEI>system-view //进入系统视图。
[~HUAWEI]ntp unicast-server 10.1.1.1 vpn-instance VRF_OM
//连接外部NTP服务器,10.1.1.1为外部NTP服务器IP地址,此处仅为示例。vpn-instance VRF_OM表示与NTP服务器对接使用的vpn-instance,如果没有,可不添加该参数。
[~HUAWEI]commit //提交配置。

ntp server有认证

shell 复制代码
<HUAWEI>system-view //进入系统视图。
[~HUAWEI]ntp authentication enable //使能NTP认证功能。
[*HUAWEI]ntp authentication-keyid 10 authentication-mode hmac-sha256 Huawei@123 //配置NTP认证密钥。
[*HUAWEI]ntp trusted authentication-keyid 10 //声明可信的密钥。
[*HUAWEI]commit //提交配置。
[~HUAWEI]ntp unicast-server 10.1.1.1 authentication-keyid 10 vpn-instance VRF_OM//连接外部NTP服务器,并指定使用密钥ID10加密。
[*HUAWEI]commit //提交配置。
相关推荐
马立杰1 小时前
H3CNE-33-BGP
运维·网络·h3cne
云空2 小时前
《DeepSeek 网页/API 性能异常(DeepSeek Web/API Degraded Performance):网络安全日志》
运维·人工智能·web安全·网络安全·开源·网络攻击模型·安全威胁分析
没有名字的小羊3 小时前
Cyber Security 101-Build Your Cyber Security Career-Security Principles(安全原则)
运维·网络·安全
千夜啊3 小时前
Nginx 运维开发高频面试题详解
运维·nginx·运维开发
存储服务专家StorageExpert4 小时前
答疑解惑:如何监控EMC unity存储系统磁盘重构rebuild进度
运维·unity·存储维护·emc存储
行十万里人生5 小时前
Qt事件处理:理解处理器、过滤器与事件系统
开发语言·git·qt·华为od·华为·华为云·harmonyos
chian-ocean6 小时前
从理论到实践:Linux 进程替换与 exec 系列函数
linux·运维·服务器
敖行客 Allthinker6 小时前
从 UTC 日期时间字符串获取 Unix 时间戳:C 和 C++ 中的挑战与解决方案
linux·运维·服务器·c++
JunLan~7 小时前
Docker 部署 GLPI(IT 资产管理软件系统)
运维·docker·容器
慕雪华年9 小时前
【Linux】opencv在arm64上提示找不到libjasper-dev
linux·运维·opencv