until June my backups with sftp works, but after then i only got “Server HMAC algorithm not found”. I am using ssh/sftp with ppk file (which i converted with puuygen). All that went well for years until a few months ago.
I have testes the connection also with syncovery, it seems to be okay.
ssh -Q mac
hmac-sha1
hmac-sha1-96
hmac-sha2-256
hmac-sha2-512
hmac-md5
hmac-md5-96
…
I updated ro 1.9.0 already.
Any ideas?
Thanks,
Tom
Updated what thing? Who controls the server? Did anything change that might have caused this?
Duplicati has little to do with ssh client, but a lot to do with your server which is why I ask about it.
https://github.com/sshnet/SSH.NET/tree/2023.0.1 describes what crypto your Duplicati may have. Some might be limited by things like mono encryption. What Duplicati on what OS is this running?
I updated Duplicati to 2.0.8.1 - and tested on windows as well as ubuntu. The server is commercial, i got the info i need to use one of
hmac-sha1
hmac-sha1-96
hmac-sha2-256
hmac-sha2-512
hmac-md5
hmac-md5-96
umac-64@openssh (dot) com
umac-128@openssh (dot) com
hmac-sha1-etm@openssh (dot) com
hmac-sha1-96-etm@openssh (dot) com
hmac-sha2-256-etm@openssh (dot) com
hmac-sha2-512-etm@openssh (dot) com
hmac-md5-etm@openssh (dot) com
hmac-md5-96-etm@openssh (dot) com
umac-64-etm@openssh (dot) com
umac-128-etm@openssh (dot) com
I suppose the easiest next thing is to test them on that using -m mac option, for example:
$ ssh -m hmac-md5 <host>
The SSH server I tested doesn’t accept that one, and the OpenSSH client tells me so with:
Unable to negotiate with REDACTED port 22: no matching MAC found. Their offer: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
If you drop the -m mac and add -vvv to the command, I think you can study the negotiation.
At least the first six items they claim to support match what SSH.NET also claims to support.
If your Duplicati config is using SSH Advanced options, does simpler get any further?
Algorithms are negotiated very early, so you don’t need to actually proceed to a login.
Using the -vvv supports a theory on how the -m hmac-md5 managed to get by. If I also add
-c aes128-ctr
the ssh ends at
Unable to negotiate with <server> port 22: no matching MAC found. Their offer: umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com
Presumably the server side introduced this very limited support then, although they claim more. Duplicati might update to the 2024 library later, but it may have to be a Canary test release first.
This list seems to be wrong based on what’s actually coming from server. Can they loosen any?
For completeness, I’ll note that -c aes128-ctr by itself without MAC limit can connect in ssh.
Ideally their server will change its config to allow a MAC that is supported (see previous link).
If that’s impossible, you can see if rclone SFTP can access. If so, Duplicati can use it instead:
Rclone (rclone):
This backend can read and write data to Rclone.
Supported options:
--rclone-local-repository (String): Local repository
Local repository for Rclone. Make sure it is configured as a local drive,
as it needs access to the files generated by Duplicati.
* default value: local
--rclone-remote-repository (String): Remote repository
Remote repository for Rclone. This can be any of the backends provided by
Rclone. More info available on https://rclone.org/.
* default value: remote
--rclone-remote-path (String): Remote path
Path on the Remote repository.
* default value: backup
--rclone-option (String): Rclone options.
Options will be transferred to rclone.
--rclone-executable (String): Rclone executable
Full path to the rclone executable. Only needed if it's not in your path.
* default value: rclone
We see the same issue with Duplicati SFTP after our latest round of SSH/SFTP server hardening, which removed the hmac-sha2-512 and hmac-sha2-256 MACs flagged as weak by ssh-audit due to their encrypt-and-MAC method.
So +1 from here to the suggestion about upgrading the dependency to SSH.NET 2024.x, which added support for a number of modern MACs.
Only issue: The fingerprint match doesn’t seem to work right. I get success on testing the connection, but during the backup it claims that the fingerprint is wrong. With “accept any fingerprint” it is no problem.
I double checked the fingerprints and see no difference.