首页 > IT职业 > IT生活 > Linux SSH登录设置步骤
ssh-keygen 在服务器上安装密钥 cd .ssh
cat id_rsa.pub >> authorized_keys 设置正确的权限 chmod 600 authorized_keys
chmod 700 ~/.ssh 找开密钥功能,关闭密码登录 RSAAuthentication yes
PubkeyAuthentication yes
PermitRootLogin yes
PasswordAuthentication no 重启 sshd 服务使配置生效 service sshd restart 下载密钥使用密钥登录 id_rsa 来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2572/viewspace-2808035/ ,如需转载,请注明出处,否则将追究法律责任。