Loading
0

解决mac电脑报错:no matching host key type found. Their offer: ssh-rsa,ssh-dss

前言:在苹果MacBook电脑ssh登录linux报错“Unable to negotiate with 47.104.0.0 port 22: no matching host key typeTheir offer: ssh-rsa,ssh-dss”在其他windows或者linux的系统中登录是正常的。一番折腾找到了如下解决方法,遇到后可以试下。
报错如图:

The default interactive shell is now zsh.To update your account to use zsh,please runchsh -s /bin/zsh'For more details,please visit https://support.apple.com/kb/HT208050MacBook-Pro:~ xff$ ssh -VOpenSSH_9.0p1, LibreSSL 3.3.6MacBook-Pro:~xff$ ssh root@47.104.0.0 Unable to negotiate with 47.104.0.0 port 22: no matching host key typeTheir offer: ssh-rsa,ssh-dss

解决方法:
在ssh登录命令后面添加参数:

-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa

例如我的登录完整命令为

ssh root@47.104.0.0 -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa

声明:站长码字很辛苦啊,转载时请保留本声明及附带文章链接:https://blog.tag.gg/showinfo-3-36276-0.html
亲爱的:若该文章解决了您的问题,可否收藏+评论+分享呢?
上一篇:kubernetes/k8s中Job和Cronjob任务部署方法
下一篇:kubernetes/k8s创建Secret加密数据并挂载方法