Testing SSH backup for Warm Spare

I added an SSH location in Filestore.

Then I created a backup to use it. Only backing up Core for the test.

But when the backup runs it says it cannot log in.

But I can log in with no password with the specified key.

hi @sorvani please try ssh after switching to asterisk user.

su asterisk
try ssh command

sometimes, ssh tries to add an entry to “known_host” and ask for permission, which needs to be manually enabled (press y) so that next time onward, it will ssh without asking for anything.

Let me know if this helps.

Look at the last screen shot. I ran the command as the asterisk user.

But just to make you happy @kgupta1

Hi, @sorvani thanks for the update. Ideally should not happen. Please raise jira at issues.freepbx.org and if SSH is possible then PM me with your server access details, I can quickly check.


Issue opened. https://issues.freepbx.org/browse/FREEPBX-22021

So, more testing today. The problem is using a key other than the default id_rsa key.

I don’t use RSA keys on anything anymore. Have not for years. So this is an issue with something in the code most likely not reading keys in formats other than RSA.

As soon as I changed filestore to use /home/asterisk/.ssh/id_rsa the backup worked.

[[email protected] ~]# fwconsole bu --backup 8f407dee-148d-4cbc-92e4-0d55fc4b474a
Transaction ID is: 35080f5f-1ef7-4667-9179-a1fb42015f97
Running Backup ID: 8f407dee-148d-4cbc-92e4-0d55fc4b474a
Transaction: 35080f5f-1ef7-4667-9179-a1fb42015f97
Starting backup Test-SSH
This backup will be stored locally and is subject to maintenance settings
Backup File Name: 20201109-140848-1604948928-
Working with core module
Exporting Feature Codes from core
Exporting Advanced settings from core
Exporting KVStore from Core
	Adding module manifest for core
	Adding custom directory to tar: customdir/etc/asterisk
Starting Cleaning up
Finished Cleaning up
Finished created backup file: 20201109-140848-1604948928-
Performing Local Maintenance
Finished Local Maintenance
Performing Remote Maintenance
Finished Remote Maintenance
Saving to selected Filestore locations
	Saving to: SSH:'Local FreePBX 15' instance ,File location: /var/spool/asterisk/backup/Test-SSH/20201109-140848-1604948928- 
Finished Saving to selected Filestore locations
Backup completed successfully
[[email protected] ~]# 

Currenlty filestore module supports only RSA public-key algorithm for SSH key


1 Like

But you could ‘fiddle it’ with a ‘local’ sshfs mount of your flavor.

I could get around it in many ways. That is not the point.

But instead of trying fix the problem, let’s update the wiki to say you can’t use anything but a depreciated algorithm.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.