配置ntp时间服务器,确保客户端主机能和服务主机同步时间
server端:
yum install chrony.x86_64
vim /etc/chrony.conf
server ntp.aliyun.com iburst (修改第三行)
allow 192.168.174.131/24 (修改第26行)
systemctl restart chronyd (重启服务)
chronyc sources -v (同步时间)
客户:
yum install chrony.x86_64
vim /etc/chrony.conf
server 192.168.174.130 iburst (修改第三行)
systemctl restart chronyd (重启服务)
chronyc sources -v (同步时间)
同步成功:
配置ssh免密登陆,能够实现客户端主机通过服务器端的redhat账户进行基于公钥验证方式的远程连接
虚拟机之间实现免密登录
- 第一步:定位node1,制作公私对
[root@node1 ~]# ssh-keygen -t rsa # 一路回车即可
- 第二步:定位node1,将公钥上传
[root@node1 ~]# ssh-copy-id root@192.168.48.130 # 将node1公钥上传给130主机
- 第三步:客户端测试
[root@node1 ~]# ssh redhat@192.168.48.130
[root@server ~]# exit
Connection to 192.168.48.130 closed.
- 第四步:在server’端制作公私钥对,将其上传给node1端即可