华为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 //提交配置。
相关推荐
YCY^v^3 小时前
centos 7 开启80,443端口,怎么弄?
linux·运维·centos
北南京海3 小时前
[Linux]进程地址空间
linux·运维·服务器
yzx9910134 小时前
服务器生成图片
运维·服务器
小阳睡不醒8 小时前
小白成长之路-部署Zabbix7(二)
android·运维
杰克逊的日记8 小时前
GPU运维常见问题处理
linux·运维·gpu
caolib8 小时前
无需云服务器的内网穿透方案 -- cloudflare tunnel
运维·服务器·内网穿透·tunnel·cloudflared
奇舞精选8 小时前
k8s基本概念初探
运维
誰能久伴不乏9 小时前
Linux系统调用概述与实现:深入浅出的解析
linux·运维·服务器
程序员学习随笔9 小时前
Linux进程深度解析(2):fork/exec写时拷贝性能优化与exit资源回收机制(进程创建和销毁)
linux·运维·服务器
-SGlow-10 小时前
MySQL相关概念和易错知识点(2)(表结构的操作、数据类型、约束)
linux·运维·服务器·数据库·mysql