I get this error when using rsync:

$ rsync -av server:file .
Unable to negotiate with port 22: no matching host key type found. Their offer: ssh-dss
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.1]

How to fix it?


Here is the solution

$ rsync -av -e 'ssh -oHostKeyAlgorithms=+ssh-dss' server:file .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.