Enable verbose ssh in backups?

backup
Tags: #<Tag:0x00007f70279088e8>

(Mike Wayne) #1

I have created an ssh server in filestore.
I have set keys correctly. This command works correctly:
$ sudo -u asterisk <username>@<backupserver> pwd
(both with IP address and hostname)

But backups always fail with
Could not login with username: <username>, host: <hostname>
(username and IP address are correct)

tcpdump on the remote ssh server shows ssh traffic but, of course it’s encrypted. I think that to get to the bottom of this, I need to enable verbose mode (-vvv) on the ssh command that backup is using.

Is there an easy way for me to do that?

Furthermore, while the backup is running, I can see it in
/var/spool/asterisk/backup/<backupname>
but as soon as the backup completes, it is removed. From reading the wiki, my understanding is that failed backups are supposed to remain there?


(Mike Wayne) #2

Did some digging into the code. This whole section should be marked broken.

FreePBX is not using ssh at all. It’s actually using sftp. There is a very significant difference between the two.


#3

Are you able to successfully ssh directly onto the destination server from the pbx’s command line, when using the same key specified in the Filestore? I think that’s what you were saying in your first post, but I didn’t see “ssh” in the command, and wanted to confirm.

There isn’t a away that I know of to easily increase the verbosity of the ssh connection attempts from the Backup module, but one thing to check is if you have the SSH Filestore’s Path already created on your destination server, with the proper access permissions. I don’t think that would lead to a login error, but wanted to double check. Also, can you tell us the version of the Backup module that is on your system?