华为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 //提交配置。
相关推荐
七夜zippoe6 小时前
CANN Runtime任务描述序列化与持久化源码深度解码
大数据·运维·服务器·cann
Fcy6488 小时前
Linux下 进程(一)(冯诺依曼体系、操作系统、进程基本概念与基本操作)
linux·运维·服务器·进程
袁袁袁袁满8 小时前
Linux怎么查看最新下载的文件
linux·运维·服务器
代码游侠8 小时前
学习笔记——设备树基础
linux·运维·开发语言·单片机·算法
Harvey9038 小时前
通过 Helm 部署 Nginx 应用的完整标准化步骤
linux·运维·nginx·k8s
御承扬9 小时前
鸿蒙NDK UI之文本自定义样式
ui·华为·harmonyos·鸿蒙ndk ui
大雷神9 小时前
HarmonyOS智慧农业管理应用开发教程--高高种地--第29篇:数据管理与备份
华为·harmonyos
珠海西格电力科技9 小时前
微电网能量平衡理论的实现条件在不同场景下有哪些差异?
运维·服务器·网络·人工智能·云计算·智慧城市
释怀不想释怀10 小时前
Linux环境变量
linux·运维·服务器
zzzsde10 小时前
【Linux】进程(4):进程优先级&&调度队列
linux·运维·服务器