1. Create a Key on the “Origin Server”
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory ‘/root/.ssh’.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Press enter to create the SSH Key without a password (not sure of the no password implications, in our case our servers are behind a firewall so I’m not worried about security issues)
2. Copy the Key to “Destination” Server
# ssh-copy-id -i ~/.ssh/id_rsa.pub admin@destinationip
root@Asterisk:~# ssh-copy-id -i ~/.ssh/id_rsa.pub firstname.lastname@example.org
The authenticity of host ‘192.168.1.232 (192.168.1.232)’ can’t be established.
ECDSA key fingerprint is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed — if you are prompted now it is to install the new keys
Number of key(s) added: 1
Now try logging into the machine, with: “ssh ‘email@example.com′”
and check to make sure that only the key(s) you wanted were added.
3. Test if the Key transfer has been succesful
To check this, try to SSH to the other server and if access is granted without requesting password the Key is correctly installed
4. Try doing some rsync tests.
rsync -az /var/spool/asterisk/monitor/test.wav firstname.lastname@example.org.X.X:/volume1/NetBackup/Servers/MIA/Asterisk