Hi folks, I’m deeply puzzled.
I’ve set up a new FreePBX 16 server, patched up to date, and I’m unable to backup using the SSH file store (but I can use S3 thank goodness).
I’ve copied the public key data from the source /home/asterisk/.ssh/id_rsa.pub
to the destination and inserted the contents in the remote /home/freepbx/.ssh/authorized_keys
file.
I’ve verified that for the asterisk user on the source, the required destination server is in the known_hosts
file, by doing a repeated manual ssh, which thereafter works perfectly fine with no extra confirmations or passwords required (please accept my [*REDACTIONS*]
in the excerpts below)
[asterisk@freepbx ~]$ ssh -i ~/.ssh/id_rsa freepbx@[*HOSTNAME*] -p [*PORT*]
freepbx@[*HOSTNAME*]:~$ logout
Connection to [*HOSTNAME*] closed.
I’ve checked that the public key is an RSA key and nothing “funky” as per this thread by looking at the start of the key (ssh-rsa AAAA....
) and adding the debug to the ssh command so it says:
debug1: Offering RSA public key: /home/asterisk/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 535
debug1: Authentication succeeded (publickey).
However, when I run the backup it fails with nothing more helpful than:
Finished created backup file: 20230121-215250-1674337970-16.0.30-486126098.tar.gz
Performing Local Maintenance
Finished Local Maintenance
Performing Remote Maintenance
Could not login with username: freepbx, host: [*HOSTNAME*]
Finished Remote Maintenance
Saving to selected Filestore locations
Could not login with username: freepbx, host: [*HOSTNAME*]
Finished Saving to selected Filestore locations
There were errors during the backup process
Could not login with username: freepbx, host: [*HOSTNAME*]
Could not login with username: freepbx, host: [*HOSTNAME*]
While the backup is running I can see a successful TCP connection (three in fact, by repeatedly running netstat -an | fgrep [*PORT*]
:
tcp 0 0 [*SOURCEIP*]:43122 [*DESTIP*]:[*PORT*] ESTABLISHED
tcp 0 0 [*SOURCEIP*]:43122 [*DESTIP*]:[*PORT*] TIME_WAIT
tcp 0 0 [*SOURCEIP*]:43138 [*DESTIP*]:[*PORT*] ESTABLISHED
tcp 0 64 [*SOURCEIP*]:43140 [*DESTIP*]:[*PORT*] ESTABLISHED
Does anyone have insight as to why the connection from the fwconsole backup is failing, but from ssh at the console it’s perfectly happy?
Cheers
Mike