您尚未登录。

楼主 # 2024-04-05 11:25:18

memory
会员
注册时间: 2021-08-11
已发帖子: 240
积分: 214

Ubuntu22.04用原来Ubuntu18.04的密钥无法登录了,显示Server refused our key

如题

离线

楼主 #1 2024-04-05 11:27:01

memory
会员
注册时间: 2021-08-11
已发帖子: 240
积分: 214

Re: Ubuntu22.04用原来Ubuntu18.04的密钥无法登录了,显示Server refused our key

看授权日志 /var/log/auth.log

No supported authentication methods available [preauth]
userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]

根据这个问 chatgpt

离线

楼主 #2 2024-04-05 11:27:46

memory
会员
注册时间: 2021-08-11
已发帖子: 240
积分: 214

Re: Ubuntu22.04用原来Ubuntu18.04的密钥无法登录了,显示Server refused our key

打开 /etc/ssh/sshd_config

添加 PubkeyAcceptedAlgorithms  +ssh-rsa

然后禁止密码登录:PasswordAuthentication no

搞定收工

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn