Problems with backup to SFTP

I’m trying to get backups working again…

Short history: I’ve had backup to SFTP working for a couple of years now, most recently to machine running Ubuntu 20.04. I recently reinstalled that machine with Ubuntu 22.04.

In the process, the host keys changed, and the newer version of SSH deprecates RSA keys. I updated my keys to ECDSA and removed the old host keys from known_hosts. I can now sftp to the server from the command line while logged into both asterisk and root. I have verified that I can upload a file using SFTP.

However, when I run the backup, I get this message:

Saving to selected Filestore locations
Saving to: SSH:‘pbx’ instance ,File location: /data1/Backup/PBX/20220718-132404-1658165044-16.0.21.3-969160050.tar.gz
Finished Saving to selected Filestore locations
There were errors during the backup process
Could not login with username: pbx, host: 10.1.1.2

When I look on the server end, I see this:

Jul 18 17:27:59 jupiter sshd[39185]: Accepted publickey for pbx from 10.1.1.20 port 60426 ssh2: ECDSA SHA256:
Jul 18 17:27:59 jupiter sshd[39185]: pam_unix(sshd:session): session opened for user pbx(uid=1014) by (uid=0)
Jul 18 17:27:59 jupiter systemd-logind[859]: New session 69 of user pbx.
Jul 18 17:28:02 jupiter sshd[39233]: Received disconnect from 10.1.1.20 port 60426:11: disconnected by user
Jul 18 17:28:02 jupiter sshd[39233]: Disconnected from user pbx 10.1.1.20 port 60426
Jul 18 17:28:02 jupiter sshd[39185]: pam_unix(sshd:session): session closed for user pbx
Jul 18 17:28:02 jupiter systemd-logind[859]: Session 69 logged out. Waiting for processes to exit.
Jul 18 17:28:02 jupiter systemd-logind[859]: Removed session 69.

Any suggestions on what might be doing wrong or how to troubleshoot this? I have no clue why this is failing. I tried deleting and recreating the filestore. My server is now running a much newer version of the SSHD. Any known issues with this?

Follow-up to this: When I’m in the Backup & Restore section, I went over to Global Settings and noted that it was showing an ssh-rsa public key there that I couldn’t change. Verified that the contents of that key is coming from /home/asterisk/.ssh/id_rsa.pub. When I deleted id_rsa.pub, something regenerated it with a tag of “phpseclib-generated-key”.

Is there any chance that the actual backup process is trying to use the id_rsa private key instead of the id_ecdsa key?

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