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

后端 未结 7 979
自闭症患者
自闭症患者 2020-12-02 05:22

I am trying to create a git repository on my web host and clone it on my computer. Here\'s what I did:

  1. I created a repository on the remote server.
  2. I
7条回答
  •  無奈伤痛
    2020-12-02 06:01

    The recent openssh version deprecated DSA keys by default. You should suggest to your GIT provider to add some reasonable host key. Relying only on DSA is not a good idea.

    As a workaround, you need to tell your ssh client that you want to accept DSA host keys, as described in the official documentation for legacy usage. You have few possibilities, but I recommend to add these lines into your ~/.ssh/config file:

    Host your-remote-host
        HostkeyAlgorithms +ssh-dss
    

    Other possibility is to use environment variable GIT_SSH to specify these options:

    GIT_SSH_COMMAND="ssh -oHostKeyAlgorithms=+ssh-dss" git clone ssh://user@host/path-to-repository
    

提交回复
热议问题