ssh远程redhat6报错:Unable to negotiate with *.*.*.* port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

报错:Unable to negotiate with *.*.*.* port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

分析:openssh觉得ssh-rsa加密方式不安全, 直接从8.8开始默认不允许这种密钥用于登陆了

 

解决:

修改ssh客户端配置文件

cat /etc/ssh/ssh_config.d/redhat6.conf
Host *
PubkeyAcceptedKeyTypes +ssh-rsa
HostKeyAlgorithms +ssh-rsa

第一行说明对所有主机生效,

第二行是将ssh-rsa加会允许使用的范围,

第三行是指定所有主机使用的都是ssh-rsa算法的key

posted @   咿呀哒喏  阅读(1781)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 推荐几款开源且免费的 .NET MAUI 组件库
· 实操Deepseek接入个人知识库
· 易语言 —— 开山篇
· 一个费力不讨好的项目,让我损失了近一半的绩效!
点击右上角即可分享
微信分享提示