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

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

在我把本地程序提交到远程分支上时


$ git push origin share_daily


会提示有如下的错误


Unable to negotiate with XX.XX.XX.XX: no matching host key type found. Their offer: ssh-dss
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.


此时我翻阅了大篇幅的文章,英文的中文的,提供几个有价值的链接给大家。


1.Using OpenSSH with legacy SSH implementations:http://www.openssh.com/legacy.html(针对性解决问题)

2.Generating SSH keys:https://help.github.com/articles/generating-ssh-keys/(虽然没有解决我的问题,但长了不少知识,或许对很多的问题可以起到解决的作用)

后来在我的.ssh目录下增加了config文件,命令如下:$ vim config


在config中需要写入如下内容:

Host git.XX.XX.com

HostKeyAlgorithms +ssh-dss

第一句中的XX.XX大家根据自己的项目中ssh链接查看@后面到‘:’前的一段,格式为git.XX.XX.com.保存文件,重新提交就好了

ssh://hzluoyun1@ git.XX.XX.com:XXXXX.git


目录
打赏
0
0
0
0
4
分享
相关文章
解决ssh: connect to host IP port 22: Connection timed out报错(scp传文件指定端口)
解决 `ssh: connect to host IP port 22: Connection timed out` 报错涉及检查 SSH 服务状态、防火墙配置、网络连通性和主机名解析等多个方面。通过逐步排查上述问题,并在 `scp` 命令中正确指定端口,可以有效解决连接超时的问题,确保文件传输的顺利进行。希望本文提供的解决方案能帮助您快速定位并解决该错误。
348 3
解决ssh: connect to host IP port 22: Connection timed out报错(scp传文件指定端口)
通过这些步骤和方法,您可以有效解决“ssh: connect to host IP port 22: Connection timed out”问题,并顺利使用 `scp`命令传输文件。
1237 7
Curl error (60): SSL peer certificate or SSH remote key was not OK for https://update.cs2c.com.cn/NS/V10/V10SP2/os/adv/lic/base/x86_64/repodata/repomd.xml [SSL: no alternative certificate subject name matches target host name 'update.cs2c.com.cn']
【10月更文挑战第30天】在尝试从麒麟软件仓库(ks10-adv-os)下载元数据时,遇到 SSL 证书验证问题。错误提示为:`Curl error (60): SSL peer certificate or SSH remote key was not OK`。可能原因包括证书不被信任、证书与域名不匹配或网络问题。解决方法包括检查网络连接、导入 SSL 证书、禁用 SSL 证书验证(不推荐)、联系仓库管理员、检查系统时间和尝试其他镜像。
816 1
ssh: connect to host github.com port 22: Connection refused
本文讨论了在使用Git命令操作GitHub时遇到的"ssh: connect to host github.com port 22: Connection refused"错误,分析了可能的原因,并提供了使用443端口或https协议作为解决方案,最终确定问题是由于DNS解析错误导致,通过修改hosts文件解决。
ssh: connect to host github.com port 22: Connection refused
【git】解决git报错:ssh:connect to host github.com port 22: Connection timed out 亲测有效
【git】解决git报错:ssh:connect to host github.com port 22: Connection timed out 亲测有效
2473 1
jsch 报错 no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha> 如何处理
【5月更文挑战第24天】jsch 报错 no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha> 如何处理
777 1
Linux中SSH命令介绍
Linux中SSH命令介绍
222 2