找到/etc/ssh/sshd_config文件
开启
RSAAuthentication yesPubkeyAuthentication yesAuthorizedKeysFile .ssh/authorized_keys .ssh 目录的权限必须是0700 .ssh/authorized_keys 文件权限必须是0600 否则公钥认证不会生效。