SSH copy-id work, but then Permission denied

My YunoHost server

Hardware: Computer at home
YunoHost version: 11.2.9.1
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes
If yes, please explain: I use KeepassXC to store my SSH key via the SSH agent, not that I think it matters for my problem…


Hi everyone ! I have a small SSH issue…

Description of my issue

Similar but distinct to : SSH Key permission denied 11.1.11.2

Same problem. I can upload my key with ssh-copy-id. Then I disable password authentication. But when trying to connect via ssh, I get pp44@yuno.tld: Permission denied (publickey).

So I follow the instruction in the post mentioned above, and on my server try sudo tail -f /var/log/auth.log to get te log. Here I have the same error as the previous post, but not with the admin folder, but my own !

Authentication refused: bad ownership or modes for directory /home/pp44

Isn’t that weird ? I don’t remember messing with my home folder ownership, but maybe I did and didn’t realize/remember ?

I checked the owner of my home directory, the ~/.ssh directory, and the authorized_keys file, and everything seems right.

I checked the key in the file against my client key and they match too.

Any idea ?

I did realize something weird : I have 775 permissions on all my users home directories, is that standard ? Shouldn’t it be 755 at least, or even 700 ?

I will try to change that.

Found the solution on my own, posting here if it happens to anyone:

changed my home folder permissions to be more restrictive

chmod 755 /home/pp44/

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.