0
(0)
可以执行此命令看事件:
tail -f /var/log/messages
如果看到有说不能访问 ~/.ssh/authorized_keys 这个文件的,可以尝试下修改.ssh目录的权限为700,authorized_keys 文件的权限为 600
如果是 selinux 限制了访问,例如
Feb 9 16:04:20 localhost python: SELinux is preventing /usr/sbin/sshd from read access on the file authorized_keys.#012#012***** Plugin catchall (100. confidence) suggests **************************#012#012If you believe that sshd should be allowed read access on the authorized_keys file by default.#012Then you should report this as a bug.#012You can generate a local policy module to allow this access.#012Do#012allow this access for now by executing:#012# ausearch -c 'sshd' --raw | audit2allow -M my-sshd#012# semodule -i my-sshd.pp#012
则可以按照日志中的提示执行
ausearch -c 'sshd' --raw | audit2allow -M my-sshd
semodule -i my-sshd.pp
/sbin/restorecon -v ~/.ssh/authorized_keys
这篇文章有用吗?
提交评分
平均评分 0 / 5. 投票数: 0
到目前为止还没有投票!成为第一位评论此文章。
很抱歉,这篇文章对您没有用!
让我们改善这篇文章!
告诉我们我们如何改善这篇文章? 提交反馈
最新发布的其他内容: