I am trying to backup to a remote ssh server. I can use ssh and winSCP to connect to the remote server on port 2222. Freepbx seems like it is trying to connect on 22.
Initializing Backup 2
Backup Lock acquired!
Running pre-backup hooks…
Adding items…
Building manifest…
Creating backup…
Storing backup…
Warning: Identity file -l not accessible: No such file or directory.
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
SSH Error (255) - Received [] from /usr/bin/ssh -o StrictHostKeyChecking=no -i -l pbx 1.1.1.1 -p 2222 'mkdir -p /backup/pbx/PBX_Full’
Warning: Identity file -P not accessible: No such file or directory.
ssh: connect to host 1.1.1.1 port 22: Connection refused
lost connection
SCP Error (1) - Received [] from /usr/bin/scp -o StrictHostKeyChecking=no -i -P 2222 /var/spool/asterisk/tmp/20170703-124922-1499100562-13.0.192.8-1550583711.tgz [email protected]:/backup/pbx/Lind_PBX_Full
Warning: Identity file [email protected] not accessible: No such file or directory.
ssh: Could not resolve hostname ls: Name or service not known
Running post-backup hooks…
Backup successfully completed!
When you created the SSH Server in the Backup & Restore module there is a field for the remote SSH port. It defaults to 22, you should change that to the port you have SSH listening on.
Begin by creating a user and an SSH key on your warm standby server so that it can log in to the primary production server and transfer backups to itself.
Login to your backup server with an SSH client such as PuTTy, SecureCRT, or other SSH client.
At the prompt type: sudo -u asterisk ssh-keygen
Next we will copy the key to the primary server so that the backup server can SSH to the primary server without needing a password. Issue the command.
At the prompt type: sudo -u asterisk ssh-copy-id -i /home/asterisk/.ssh/id_rsa.pub root@PrimaryServerIP and enter the password when prompted.
APPLICATION NOTE
Make sure you replace the PrimaryServerIP with the IP Address of your primary PBX.
If this command completes without error, you are ready to test:
At the prompt type: ssh -i /home/asterisk/.ssh/id_rsa root@PrimaryServerIP
If all went well, you should now be logged in to the Primary server.