1.打开权限 vim /etc/ssh/sshd_config 去掉 PubkeyAuthentication yes 一行的#
2.重启ssh服务 systemctl restart sshd
2.生成秘钥对[windows cmd 或 liunx服务器] ssh-keygen -t rsa
3.上传服务公钥钥 cd /root/.ssh/ cp id_rsa.pub authorized_keys
4.修改权限 chmod 600 authorized_keys chmod 700 ~/.ssh
5.测试登入 ssh -i id_rsa root@ip
标签:rsa,chmod,秘钥,ssh,登入,id,SSH From: https://www.cnblogs.com/When6/p/16813843.html