当前位置:   article > 正文

解决 ssh登录失败的原因_ssh-dss

ssh-dss

1、新mac电脑登录ssh失败

mac系统,想通过ssh连接,但出现以下报错:Unable to negotiate with 10.188.5.86 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

解决办法:参考如下方式进行连接 ssh -oHostKeyAlgorithms=+ssh-dssAdministrator@10.254.0.56

即在ssh后加入-oHostKeyAlgorithms=+ssh-dss

2、增加后仍然报错

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. 
The fingerprint for the RSA key sent by the remote host is SHA256:****....jQXVUpKZIDTMczCvj3tD2s. Please contact your system administrator. Add correct host key in /c/Users/...02/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/...02/.ssh/known_hosts:1 RSA host key for github.com has changed and you have requested strict checking. Host key verification failed. 
Could not read from remote repository. 
Please make sure you have the correct access rights and the repository exists.

 

OpenSSH的时候会将每个你访问过计算机的公钥(public key)都记录在/.ssh/known_hosts。当下次访问相同计算机时,OpenSSH会核对公钥。如果公钥不同,OpenSSH会发出警告,信息报错类似错误,如当前情况。

解决办法删除.ssh/known_hosts的指定行,保留其他信息

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/221826?site
推荐阅读
相关标签
  

闽ICP备14008679号