Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can't use SSH keys Authentication refused: bad ownership or modes for directory /

Featured Replies

I have run chmod etc. This is 6.11.5 so the directories are sym-linked to the usb. I have everything set up and working across my other homelab parts and unirad used to work. It has suddenly stopped. Diag attached.

 

Jan 20 10:22:38 TheLibrary  sshd[22133]: Authentication refused: bad ownership or modes for directory /
Jan 20 10:22:38 TheLibrary  sshd[22133]: Failed publickey for root from 192.168.0.50 port 49714 ssh2: ED25519 SHA256:em7iHjwbc1OMAS6wvoCqLmHqWGv7mJR08lwu5zXtSuQ
Jan 20 10:22:38 TheLibrary  sshd[22133]: Postponed keyboard-interactive for root from 192.168.0.50 port 49714 ssh2 [preauth]
Jan 20 10:22:39 TheLibrary  sshd[22133]: Connection closed by authenticating user root 192.168.0.50 port 49714 [preauth]

thelibrary-diagnostics-20230120-1032.zip

Edited by DuzAwe

Solved by DuzAwe

  • DuzAwe changed the title to Can't use SSH keys Authentication refused: bad ownership or modes for directory /
  • Author
  • Solution

docgyvers SSH Plugin solve my issues, Not fully sure why but I'm not going to look a gift horse in the mouth.

  • 3 weeks later...

Just writing to confirm the experience of DuzAwe -- Docgyvers SSH plugin solves the issue of not being able to ssh into unraid v6.11.1 using key exchange.

 

I have a number of scripts that rely upon being able to ssh into unraid without a password. These worked fine until upgrading unraid. I tried all the fixes I could find in these forums without success. The unraid syslog.txt gave the error:

 

Authentication refused: bad ownership or modes for directory /

 

Weird, since I had already set permissions to 700 for the .ssh directory and 640 for the .ssh/authorized_keys directory as part of my troubleshooting the issue.

 

Anyhow, the plugin places an SSH icon in Settings > Network Services. Just open it and hit "Apply" without changing anything. Now everything just works.

 

 

  • 1 year later...

I'm having this same problem and the plugin isn't doing anything for me. Running 6.12.8, just started happening for no apparent reason... Can anyone help?

  • 6 months later...
On 3/17/2024 at 3:05 AM, Gex2501 said:

I'm having this same problem and the plugin isn't doing anything for me. Running 6.12.8, just started happening for no apparent reason... Can anyone help?

Had the same issue after an upgrade to 6.12.13 and plugin updates. Not sure if either of those caused the issue but found that / was owned by a shares user instead of root.

I no longer needed the user and deleted it. You'll likely be able to also run

chown root:root /

 

Edited by l3anks

I think I fixed the problem by way of a reboot. I don't recall exactly.

  • 4 months later...

I faced that issue on one of my unraid servers this morning as well. On that specific server I am using Unraid 7.0 and out of the sudden it was not accepting any ssh key logins anymore. Unraid was logging:

 

Authentication refused: bad ownership or modes for directory /

 

I am using this specific ssh setup since years without any problems.

After a reboot it was fine again.

  • 10 months later...
On 2/22/2025 at 2:00 PM, Skylinar said:

I faced that issue on one of my unraid servers this morning as well. On that specific server I am using Unraid 7.0 and out of the sudden it was not accepting any ssh key logins anymore. Unraid was logging:

 

Authentication refused: bad ownership or modes for directory /

 

I am using this specific ssh setup since years without any problems.

After a reboot it was fine again.

Same for me! Been using this key forever and all of sudden can't login. Rebooting in a few to see if that sovled it

-edit-

Can confirm, reboot solved this.

Edited by Tuumke

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.