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


DuzAwe
Go to solution Solved by DuzAwe,

Recommended Posts

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
Link to comment
  • DuzAwe changed the title to Can't use SSH keys Authentication refused: bad ownership or modes for directory /
  • 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.

 

 

  • Like 2
Link to comment
  • 1 year later...

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.