gpt4 book ai didi

linux - fedora 中没有 authorized_keys 文件

转载 作者:可可西里 更新时间:2023-11-01 15:40:08 25 4
gpt4 key购买 nike

您好,我正在我的机器上安装 hadoop,我创建了一个新组和组下的一个用户

[hduser@localhost ~]$ ssh-keygen -t rsa -P "" Generating
public/private rsa key pair. Enter file in which to save the key
(/home/hduser/.ssh/id_rsa): Created directory '/home/hduser/.ssh'.
Your identification has been saved in /home/hduser/.ssh/id_rsa. Your
public key has been saved in /home/hduser/.ssh/id_rsa.pub. The key
fingerprint is: 30:1f:1f:5d:ef:52:16:41:7e:41:81:b4:62:17:87:36
hduser@localhost.localdomain The key's randomart image is:
+--[ RSA 2048]----+ | .o*Oo| | . E=.o| | o . .ooo..=| | + o..o +.| | S . . .| | . | |
| | | | |
+-----------------+

我确实生成了私钥,密码为空,并移至 authorized_keys。下一步是 cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys

但是在连接到 ssh localhost 时,我的新用户仍然要求我输入密码。我没有生成。

最佳答案

.ssh 目录和 authorized_keys 文件应归登录用户所有,并且只能由该用户读取。默认的 ssh 配置将拒绝访问,如果它们是组或世界可读的。

检查/var/log/audit 中可能解释的条目。

关于linux - fedora 中没有 authorized_keys 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17357604/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com