RHCE-NTP、SSH服务器

 1.配置ntp时间服务器,确保客户端主机能和服务主机同步时间​

服务器端:

(1)首先安装chrony软件: dnf install -y chrony

(2)配置时间同步源:

进入vim /etc/chrony.conf ;

允许网段进行时间同步;设置优先级

(3)开启chrony服务:systemctl enable --now chronyd

(4)查看

(5)同步时间

(6)防火墙进行放行

 (7)让防火墙的设置立即生效

(8) 再次重启配置:systemctl restart chronyd.service 

客户端:

为了区分实验结果首先将客户端的时间修改:

(1)安装chrony软件: dnf install -y chrony

(2)配置时间同步服务器的ip地址

进入 vim /etc/chrony.conf 

(3)开启chrony服务:systemctl  enable --now chronyd

(4)同步

(5)重新加载:systemctl restart chronyd

 (6)检测:

 

2.配置ssh免密登陆,能够通过客户端主机通过redhat用户和服务端主机基于公钥验证方式进行远程连接

 (1)首先在客户端创建用户rethat并设置密码:useradd rethat 

(2)客户端生成密钥:

 (3)将公钥发送到服务器端:ssh-copy-id  [email protected]

(4)在服务器上查看rehat用户的公钥

 (5)在客户端上尝试登录:

猜你喜欢

转载自blog.csdn.net/qq_68163788/article/details/130044767