Xshell5登录报“找不到匹配的host key 算法“的错误
·
现象
xshell5登录欧拉22.03时报错:找不到匹配的host key 算法
解决方法一:
1.编辑/etc/ssh/sshd_config,如下所示:
# 在行尾增加",ecdh-sha2-nistp521",以满足ecdsa公钥方式登录(密钥长度521)
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp521
# 在行尾增加",ssh-rsa",以满足RSA 登录
HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-512,ssh-rsa
# 在行尾增加",ssh-rsa",以满足RSA 登录
PubkeyAcceptedKeyTypes ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-512,ssh-rsa
2.重启sshd服务
systemctl restart sshd
解决方法二
1.编辑/etc/ssh/sshd_config,如下所示:
# 屏蔽下面的2行(最后2行)
# HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-512
# PubkeyAcceptedKeyTypes ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-512
2.重启sshd服务
systemctl restart sshd
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐



所有评论(0)