1.配置ntp时间服务器,确保客户端主机能和服务主机同步时间
timedatectl 查看时区
systemctl stop firewalld 防火墙关闭
setenforce 0 关闭selinux
yum install chrony -y 安装chrony
服务器配置
vim /etc/chrony.conf
systemctl restart chronyd 重启
客户端配置
vim /etc/chrony.conf
systemctl restart chronyd 重启
测试当前时间
2.配置ssh免密登陆,能够通过客户端主机通过redhat用户和服务端主机基于公钥验证方式进行远程连接
保证openssh和rsync两个服务的安装
rpm -i openssh-2.1.1p4-1.i386.rpm
yum -y install rsync
客户端生成密钥
ssh-keygen
查看/root用户下有没有.ssh文件
将 id_rsa.pub 文件追加到授权的authorized_keys
cat id_rsa.pub >> authorized_keys
systemctl restart sshd 重启服务ssh
使用 ssh localhost 登录本地测试
将公钥传送到需要登录的远程服务器
ssh-copy-id 192.168.171.139