guys please can you help
i have the following scenario
CentOS 7 Server ASME 9.2 Server BI do the following on the
SME 9.2 Server B#
ssh-keygen -t rsaThe Following Two Keys ( files ) are created in
/root/.ssh1. id_rsa
2. id_rsa.pubI change the permission on the
id_rsa.pub file of the
SME 9.2 Server B #
chmod 600 /root/.ssh/id_rsa.pubI am still on the
SME 9.2 Server B shell and copy the created
id_rsa.pub file to
CentOS 7 Server A#
scp /root/.ssh/id_rsa.pub root@centos7IP:/root/id_rsa.pubI login to the
CentOS 7 Server A# touch /root/.ssh/authorized_keys
# chmod 600 /root/.ssh/authorized_keysNow i attach the public key generated in the
SME 9.2 Server B to the “
authorized_keys “ file on the
CentOS 7 Server A#
cat /root/id_rsa.pub >> /root/.ssh/authorized_keysI log back into the
SME 9.2 Server BWhen i do the following
#
ssh root@centos7IP - LOGIN WITHOUT PASSWORD REQUEST WORKSHere is my question
When i do the Following from the
SME 9.2 Server B#
/usr/bin/rsync -avz -e "ssh -i /root/.ssh/id_rsa.pub" root@CentOS7IP:/home /var/ServerBackupI get the following problems on the
SME 9.2 Server BEnter passphrase for key '/root/.ssh/id_rsa.pub':ANDroot@CentOS7IP's password:Please guys what do i need to do to run the script " #
/usr/bin/rsync -avz -e "ssh -i /root/.ssh/id_rsa.pub" root@CentOS7IP:/home /var/ServerBackup " without it asking me for passwords ?
Any help greatly appreciated