Install rsync
For Ubuntu or Debian
# apt-get install rsync
For SUSE or Fedora# yum install rsync
rsync without prompting for password:
Assuming the file server is ServerF and backup server is ServerB
Genarate the public key in ServerF
$ ssh-keygen
$ Enter passphrase (empty for no passphrase):
$ Enter same passphrase again:
The public key will be generated and stored in
~/.ssh/id_rsa.pub
Copy public key to remote host
ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.1.100
Or
ssh-copy-id -i ~/.ssh/id_rsa.pub "root@192.168.1.100" -p123
Or
Open id_rsa.pub, copy the content
Login to ServerB using the same user in the rsync command
In ServerB, append the contents to ~/.ssh/authorized_keys. Create the file if not exist. Make sure the file mode is 700.
Is it possible to run ssh-copy-id on port other than 22?
Thank you for such a wonderful Information !!
ReplyDeleteHere is a list of Top LINUX INTERVIEW QUESTIONS
Veritas Cluster Interview Questions
SAMBA Server Interview Questions
Linux FTP vsftpd Interview Questions
SSH Interview Questions
Apache Interview Questions
Nagios Interview questions
IPTABLES Interview Questions
Ldap Server Interview Questions
LVM Interview questions
Sendmail Server Interview Questions
YUM Interview Questions
NFS Interview Questions
Read More at :- Linux Troubleshooting