vim /etc/ssh/sshd_config
RSAAuthentication yes #开启RSA验证
PubkeyAuthentication yes #使用公钥验证
AuthorizedKeysFile .ssh/authorized_keys #公钥保存位置
所以需要把公钥写到 对应用户的目录的 .ssh/authorized_keys 下,然后重启ssh服务
systemctl restart sshd
vim /etc/ssh/sshd_config
RSAAuthentication yes #开启RSA验证
PubkeyAuthentication yes #使用公钥验证
AuthorizedKeysFile .ssh/authorized_keys #公钥保存位置
所以需要把公钥写到 对应用户的目录的 .ssh/authorized_keys 下,然后重启ssh服务
systemctl restart sshd