ITPub博客

首页 > IT职业 > IT生活 > Linux SSH登录设置步骤

Linux SSH登录设置步骤

IT生活 作者:glovey 时间:2021-09-09 09:05:41 0 删除 编辑
在服务器上制作密钥对
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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-08-16

  • 博文量
    86
  • 访问量
    770