Fedora中没有authorized_keys文件

时间:2013-06-28 05:09:07

标签: linux hadoop fedora

您好我在我的机器上安装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时,我的新用户要求我输入密码。我没有产生。

1 个答案:

答案 0 :(得分:1)

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

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