码迷,mamicode.com
首页 > 其他好文 > 详细

rhel7免密登录问题

时间:2018-10-22 22:16:38      阅读:302      评论:0      收藏:0      [点我收藏+]

标签:sshd_conf   author   cat   etc   authorize   rhel7   没有   auth   检查   

以前在做linux免密登录时只要执行:cat id_rsa.pub>> authorized_keys,就可以了

后来升级到rhel7之后不行,发现有两个需要改动:

1、修改ssh的配置文件/etc/ssh/sshd_config ,去掉两个参数的注释

PubkeyAuthentication yes(去掉注释#)

AuthorizedKeysFile .ssh/authorized_keys (rhel7.5默认是没有注释的,检查一下即可)

RSAAuthentication yes(rhel7.5中没有这个参数,无需理会)

2、修改 .ssh目录权限,去掉其他用户的读写权限

chmod 700 .ssh
chomd 600 .ssh/authorized_keys

rhel7免密登录问题

标签:sshd_conf   author   cat   etc   authorize   rhel7   没有   auth   检查   

原文地址:https://www.cnblogs.com/timlong/p/9833267.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!