华为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 //提交配置。
相关推荐
大刘讲IT4 分钟前
数据治理体系的“三驾马车”:质量、安全与价值挖掘
大数据·运维·经验分享·学习·安全·制造·零售
szxinmai主板定制专家1 小时前
国产RK3568+FPGA以 ‌“实时控制+高精度采集+灵活扩展”‌ 为核心的解决方案
大数据·运维·网络·人工智能·fpga开发·机器人
xixingzhe22 小时前
docker转移镜像
运维·docker·容器
菜狗想要变强2 小时前
Linux驱动开发--异步通知与异步I/O
linux·运维·驱动开发
高木的小天才3 小时前
鸿蒙中的并发线程间通信、线程间通信对象
前端·华为·typescript·harmonyos
终身学习基地3 小时前
第七篇:linux之基本权限、进程管理、系统服务
linux·运维·服务器
unlockjy3 小时前
Linux——进程优先级/切换/调度
linux·运维·服务器
前进的程序员4 小时前
CentOS 系统 DeepSeek 部署
运维·人工智能·centos·deepseek
成工小白4 小时前
【Linux】详细介绍进程的概念
linux·运维·服务器
wayuncn4 小时前
双卡 4090 服务器租用:释放强算力的新选择
运维·服务器