Unable to add backup using SFTP

I’m trying to create a backup using SFTP (SSH), but I keep getting the error Failed to connect: Internal Server Error.

In order to connect, I generated a key pair (default rsa didn’t work so I followed this advice here and ran:
ssh-keygen -m pem -f duplicati -t rsa -b 4096), placed the generated keys in a directory accessible by the Docker container (and specified the ssh-keyfile under advanced options) and added the public key to multiple servers in the authorized_keys file.

Whenever I press the “Test connection” button, the above error appears and nothing shows up in the logs, no matter which server I try.

On the server side, I can see the following entry in the auth.log so at least something is happening:

sshd[605099]: Connection closed by <duplicati ip> port 52218 [preauth]

What am I missing here?


I don’t know what you are missing, used same command and it worked fine. I don’t use Docker, so I checked the sftp connection from the command line, once it worked, Duplicati worked.

Unrelated: my understanding is that it’s necessary to use RSA for now as ED25519 is not secure with the current state of Duplicati, that relies on an ‘old’ version of SSH.NET.

Welcome to the forum @Subbeh

This button seems to dodge the logs somehow (maybe a non-standard code path). What about:

using URL from Export As Command-line, maybe for Duplicati.CommandLine.BackendTool.exe.
Or configure a small backup and run it. Or try that from GUI then watch live log at the Retry level.
Backup usually starts with a list operation, which is the typical Test connection sanity check.

If you’re willing, you could also test if username/password works. Another risk with ssh-keyfile is disappearance of Destination screen options (known issue). Regular Options screen avoids this.

is often an HTTP error, which makes me wonder what piece of code said it. It fits SSH poorly, per
but possibly is an HTTP 500 from Duplicati web server due to not liking something that took place.

Command line testing removes the possibility of a 500. GUI testing live log would also remove this.