Search our documentation...

Simply enter what you are looking for!

Linux :: How to rsync without prompting for password

JetBackup can use rsync in order to backup your files into remote location.

In order to do that, we will need  to a clean ssh login (without prompting for password) to the remote server.

That can be done using RSA authentication keys.

Here is a brief explanation for doing that –

Master server – server we will initiate ssh connection from (this holds our original backup files)
Slave server – server we will connect to (we will copy are backup files to this server)

Step 1 – Generate RSA keys on the master server

ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:

Step 2 – Copy the key to the slave server

We will use ‘ssh-copy-id’ tool to copy the key into the slave server –

ssh-copy-id -i root@demo-server.com
root@demo-server.com's password:
Now try logging into the machine, with "ssh 'root@demo-server.com'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.

Now test ssh connection from master server to slave server –

ssh root@demo.server.com

At first time your server will notify about “RSA key fingerprint” issue, approve it so he will add it to his known hosts file. Next login should be clean !

To use this key in JetBackup, please use the “/root/.ssh/id_rsa.pub” location when asked to provide a key when adding a new SSH destination.