Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git error: Unable to negotiate with XX.XX.XXX.XXX : no matching host key type found . their offer: ssh-dss [duplicate]

I am trying to connect to a repository that works through my VPN. I downloaded Git and when I try to clone the repo, I get this message:

Unable to negotiate with XX.XX.XXX.XXX : no matching host key type found . their offer: ssh-dss

Is there something I am missing?

like image 939
Keith Ape Avatar asked Feb 05 '16 21:02

Keith Ape


2 Answers

I have found the problem , The new OpenSSH versions disable the ssh-dss (DSA) public key algorithm. DSA was deemed too weak and OpenSSH community recommends against its use.

If you see an error similar to this:

Unable to negotiate with 10.96.8.72: no matching host key type found. Their offer: ssh-dss

...then you must re-enable the DSA keys by editing your ~/.ssh/config file to add the following line:

HostkeyAlgorithms +ssh-dss

You may need to create the ~/.ssh/config file if it does not already exist.

After creating the file, you must restrict access permissions:

chmod 600 ~/.ssh/config

and then do the clone. That should work perfectly fine!

like image 75
Keith Ape Avatar answered Oct 24 '22 02:10

Keith Ape


You're trying to clone over the ssh-protocol. The ssh server on the other side require you to use a dss key authentication, but your ssh client that git uses doesn't have access to one, probably because you haven't created one.

How you create a key depends on which ssh client and what operating system you're using.

When you create a key, you're actually creating a keypair, with one private key and one public key. The public key must be known by the server for the server to be able to authenticate you.

How you add your public key to the servers ssh-server, depends on which ssh server that is used (or which git hosting software that wraps the ssh server).

like image 26
iveqy Avatar answered Oct 24 '22 03:10

iveqy