SFTP to Strato HiDrive not working with keyfile

Hi everybody,

I “suddenly” have a problem with my off-site-backup to Strato HiDrive. It was working once and now it doesn’t anymore - not sure when it started, I just found out about it and my logs say it’s happening since at least a month… :confused:

My setup:
Latest Duplicacy Docker Container v1.8.3 (https://hub.docker.com/r/saspus/duplicacy-web/) on unRAID v6.12.2 with duplicacy-cli manually updated to v3.2.4 (after unsucessfully trying the shipped v3.2.3)
I have 2 storage destinations configured: One remote to Strato HiDrive and one local to another NAS (Synology DS412+), both using SFTP with the same keyfile for authenticating both.

The local backups (sftp to synology) work just fine.

When trying to start a remote backup, I get the following error:

Running backup command from /cache/localhost/7 to back up /backuproot/foo
Options: [-log -d -v backup -storage hidrive -threads 4 -stats]
2024-12-10 08:11:21.466 INFO REPOSITORY_SET Repository set to /backuproot/foo
2024-12-10 08:11:21.466 INFO STORAGE_SET Storage set to sftp://redacted@sftp.hidrive.strato.com//users/redacted/backup
2024-12-10 08:11:21.466 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_HIDRIVE_SSH_KEY_FILE
2024-12-10 08:11:21.671 DEBUG SSH_PUBLICKEY Attempting public key authentication
2024-12-10 08:11:21.671 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_HIDRIVE_SSH_KEY_FILE
2024-12-10 08:11:21.685 DEBUG SSH_PASSWORD Attempting password login
2024-12-10 08:11:21.685 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_HIDRIVE_SSH_PASSWORD
2024-12-10 08:11:21.685 DEBUG KEYRING_GET Failed to get the value from the keyring: keyring/dbus: Error connecting to dbus session, not registering SecretService provider: exec: "dbus-launch": executable file not found in $PATH
Enter SSH password:2024-12-10 08:11:21.685 ERROR PASSWORD_READ Failed to read the password: EOF
exit status 100

When using the “normal” sftp command inside the duplicacy docker container with the same keyfile as configured in duplicacy-web, I can connect to HiDrive just fine.

When trying to add a new storage destination for HiDrive inside duplicacy-web, I get a similar error when trying to select the destination folder:

Failed to create the sftp client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

I’ve tried setting the DUPLICACY_HIDRIVE_SSH_KEY_FILE environment variable manually (using the -e parameter with Docker), re-setting the encryption key in the duplicacy-web settings and manually connecting with sftp on the cli to accept the hostkey first.

It looks very similar to this old problem to me but I have no Idea how to check if there are any declined ciphers being negotiated nor what ciphers are okay with HiDrive:

Any help is very much appreciated and if you need any more info just tell me - I’m happy to provide! :slight_smile:

Thanks in advance,
Philipp

Try running the CLI with the sftpc:// url:

cd /emtpy/directory
~/.duplicacy-web/bin/duplicacy_cli_executable init test sftpc://redacted@sftp.hidrive.strato.com//users/redacted/backup

This enables additional key exchange algorithms some of which may make Strato HiDrive happy.

Thank you for your answer. Unfortunately the result is the same:

~ # export DUPLICACY_SSH_KEY_FILE=/config/.ssh/id_rsa
~ # /root/.duplicacy-web/bin/duplicacy_linux_x64_3.2.4 -d -v init test sftpc://redacted@sftp.hidrive.strato.
com//users/redacted/backup
Reading the environment variable DUPLICACY_SSH_KEY_FILE
Attempting public key authentication
Reading the environment variable DUPLICACY_SSH_KEY_FILE
Attempting password login
Reading the environment variable DUPLICACY_SSH_PASSWORD
Failed to store the value to the keyring: keyring/dbus: Error connecting to dbus session, not registering SecretService provider: exec: "dbus-launch": executable file not found in $PATH
Enter SSH password:
Failed to read the password:

I’m still hoping for some help… :confused:

I would ask hidrive support for why does authentication fails. Like in the old issue you linked, they may be stumbling on something client presents.

Does rclone’s sftp work with the same key?

Rclone supports a separate hidrive backend as well. You can use that and serve it to duplicacy via some other protocol.

This looks like this golang issue: ssh: validate key type in SSH_MSG_USERAUTH_PK_OK response · drakkan/crypto@dd7dbb0 · GitHub

Unfortunately the fix hasn’t got into any releases.

1 Like