SSH backup and restore issues

Cool thanks, I will keep working on it and let you know the results.

i followed all the instructions above and get:

Saving Backup 3…done!
Intializing Backup 3
Connecting to remote server…
ssh: connect to host 192.168.1.15 port 22: Connection timed out
Something went wrong when connecting to remote server. Aborting!

any ideas to test?

i commented out the ssh_config on both primary and secondary. now I get this:

Saving Backup 3…Intializing Backup 3
Connecting to remote server…
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0720 for ‘/var/lib/asterisk/.ssh’ are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /var/lib/asterisk/.ssh
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Something went wrong when connecting to remote server. Aborting!
done!

as it says the permissions are too open

chmod 700 /var/lib/asterisk/.ssh
chmod 600 /var/lib/asterisk/.ssh/id_[rd]sa
chmod 644 /var/lib/asterisk/.ssh/id_[rd]sa.pub

should fix it.

after entering:
chmod 600 /var/lib/asterisk/.ssh/id_[rd]sa

chmod: cannot access file does not exist.

I thought the file was id_rsa.pub
which I also tried. same error.

rsa and dsa are two dirfferent authentification schemes. my recipe covers both, but in your case you probably forgot to RTFM and neglected to generate the keys for the asterisk user.

in the directory (Primary server) /var/lib/asterisk/.ssh there are 2 files.
-rw–w---- authorized_keys
-rw-rw-r-- known_hosts

do I need to change permissions on those?

no, yopu need to generate the public and private keys.

man ssh-keygen

i did this. followed instructions in this thread with:
Generate your keys

sudo -u asterisk ssh-keygen

Copy public key to primary server

sudo -u asterisk ssh-copy-id -i /var/lib/asterisk/.ssh/id_rsa.pub asterisk@p-primary

Did it work?

no, I already followed the instructions in the thread. step by step. When running the backup I was getting the error message in Post #23

does

/var/lib/asterisk/.ssh/id_rsa.pub

exist on the secondary server?