先说说我的问题
我是通过 ssh-keygen -t rsa 创建的密钥。
但是登录远程服务器的时候提示:
Permission denied (password).
密码登录没问题,因此估计是配置的问题,查了资料,解决方案如下:
在远程服务器 /etc/ssh/sshd_config 中的以下设置
PubkeyAuthentication yes RSAAuthentication yes # RSA密钥 必须加
重启服务器
systemctl restart sshd
问题解决!
本站文章除注明转载/出处外,均为博主 spooking 原创或翻译,转载前请务必署名。