华为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 //提交配置。
相关推荐
HIT_Weston3 小时前
93、【Ubuntu】【Hugo】搭建私人博客:面包屑(一)
linux·运维·ubuntu
cuijiecheng20183 小时前
Linux下Beyond Compare过期
linux·运维·服务器
喵叔哟3 小时前
20.部署与运维
运维·docker·容器·.net
HIT_Weston3 小时前
92、【Ubuntu】【Hugo】搭建私人博客:侧边导航栏(六)
linux·运维·ubuntu
CodeAllen嵌入式3 小时前
Windows 11 本地安装 WSL 支持 Ubuntu 24.04 完整指南
linux·运维·ubuntu
RisunJan7 小时前
Linux命令-ipcs命令(报告进程间通信(IPC)设施状态的实用工具)
linux·运维·服务器
HABuo8 小时前
【Linux进程(四)】进程切换&环境变量深入剖析
linux·运维·服务器·c语言·c++·ubuntu·centos
橘颂TA8 小时前
【Linux】死锁四条件的底层逻辑:从锁冲突到 STL 组件的线程安全实践(Ⅵ)
linux·运维·服务器·c++·死锁
程序猿追8 小时前
【鸿蒙PC桌面端实战】从零构建 ArkTS 高性能图像展示器:DevEco Studio 调试与 HDC 命令行验证全流程
华为·harmonyos