On source server:
[oracle@oradbpr] $ ls -rlt /home/oracle/.ssh/id_rsa.pub
if above file exists, copy id_rsa.pub to destination server, else generate with below ssh-keygen command.
[oracle@oradbpr] $ ssh-keygen -t rsa
Hit enter key, when prompted for passphrase.
private key and public key generated at /home/oracle/.ssh/id_rsa.pub
copy id_rsa.pub file to remote server.(destination server)
[oracle@oradbpr]$ scp /home/oracle/.ssh/id_rsa.pub oracle@oradbdr:/home/oracle
oracle@oradbdr's password:
On destination server:
[oracle@oradbdr] $ pwd
/home/oracle
[oracle@oradbdr] $ cat id_rsa.pub >> /home/oracle/.ssh/authorized_keys
[oracle@oradbdr] $ chmod 700 /home/oracle/.ssh/authorized_keys
On source server:
[oracle@oradbpr] $ rsync -avH /orabkp/ARC_PROD* oracle@oradbdr:/backup/archbkp
now rsync without password prompting.
No comments:
Post a Comment