The issue as exposed here is solved (about files modes of the
But an other issue persists so I create a new question : > Unable to login with SSH-RSA key
I can no longer connect with ssh-rsa key for a specific user, but it still work for other users.
git user defined as follow :
# cat /etc/passwd | grep git git:x:1002:1002:,,,:/var/git:/bin/bash
So you noticed that this is the git user thus its home is
/var/git, it's not in
Now, ssh always prompt me for password :
$ ssh git@srv git@srv's password:
I checked logs :
# tail -n 1 /var/log/auth.log [...] Authentication refused: bad ownership or modes for file /var/git/.ssh/authorized_keys
authorized_keys as some ownership or modes missconfiguration.
I don't understand because here is the conf for this file :
# ls -l /var/git/.ssh/ | grep auth -rw-rw-r-- 1 git git 394 mai 22 17:39 authorized_keys
And here is (in case...) the parent
# ls -al /var/git/ | grep ssh drwxrwxr-x 2 git git 4096 mai 22 17:39 .ssh
$HOME directory :
# ls -l /var/ | grep git drwxr-xr-x 7 git git 4096 mai 27 10:49 git
So owners are always
git, like owner groups. And files are readable so where could be the trick ?