如何修复 SSH 不接受 authorized_keys 中的公钥
问题:
你已手动或使用 ssh-copy-id 将 SSH 公钥添加到远程服务器,但仍然无法使用该公钥登录
解决方案
通常这是由你的 ~/.ssh 目录和/或 authorized_keys 文件的权限错误引起的。使用以下命令修复:
fix-ssh-perms.sh
chmod -R 700 ~/.ssh然后尝试再次登录
Check out similar posts by category:
Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow