Isilon:OneFS:尝试通过 SSH 连接到群集时出现错误 -“Authentication refused: bad ownership or modes for directory /ifs/home/user/.ssh”(身份验证被拒绝:目录 /ifs/home/user/.ssh 的所有权或模式错误)

Summary: Isilon:OneFS:尝试通过 SSH 连接到群集时出现错误“Authentication refused: bad ownership or modes for directory /ifs/home/user/.ssh”(验证被拒绝:目录 /ifs/home/user/.ssh 的所有权或模式错误)

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms



 

 

用户无法通过 SSH 连接连接到群集。

 

当用户尝试通过 SSH 连接连接到群集时,会出现以下症状:
  • 将显示以下错误:
     
    Authentication refused: bad ownership or modes for directory /ifs/home/user/.ssh
    此错误也会被记录到 /var/log/auth.log 文件。
  • 即使使用了 authorized_keys 文件,也会提示用户输入其密码。

Cause

 

错误“Authentication refused: bad ownership or modes for directory”通常意味着用户的主目录~/.ssh 目录具有组写入权限。目录应该只能由用户或所有者写入,~/.ssh 权限应设置为 700authorized_keys 文件权限应设置为 600

Resolution

 

修改用户指定目录的权限。通常建议将 /ifs/home/user/.ssh/ 目录的权限设置为 750,将 authorized_keys 文件的权限设置为 644;但是这些值可能不够,需要更严格的权限。

  1. 在群集中的任意节点上打开 SSH 连接,并使用“root”帐户登录。
  2. 运行以下命令以将用户的 目录更改为只能由该用户写入,其中 <user name> 是用户的名称:

    chmod g-w /home/<user name>
     
  3. 更改用户的 ~/.ssh 目录(其中< user name>是用户的名称)的权限:

    chmod 700 /home/<user name>/.ssh
     
  4. 更改用户 authorized_keys 文件的权限,其中 <user name> 是用户的名称:

    chmod 600 /home/<user name>/.ssh/authorized_keys

    注意
    authorized_keys文件应归所有者所有,而不是“root”。

Additional Information

其它信息

请参阅知识库文章,如何设置基于密钥的 RSA SSH 登录16474

Affected Products

Isilon

Products

Isilon
Article Properties
Article Number: 000061728
Article Type: Solution
Last Modified: 24 Sep 2025
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.