Permission denied ssh only with public key

Hi, everyone

I have trouble to set public key auth, i have set up the public key to user : jean and i got :
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

when i try to connect with : jean@rockstor.my-dns

But I can log in with the account on which i made the command line ssh-copy-id: loic@rockstor.my-dns

It’s not possible to set up public key access with SFTP connection ?
Thanks for reply :slight_smile: .

Have you run ssh-copy-id jean@rockstor.my-dns to add the public key? What’s in /home/jean/.ssh/authorized_keys?

i have created user jean from webui so when i try to ssh-copy-id jean@rockstor.my-dns :

Could not chdir to home directory /home/jean: No such file or directory
bash: line 0: exec: sh: not found

Ok I’m not sure about how Rockstor creates local users but you’ll need to log in as root or sudo to root and perform the following steps.
mkdir -p /home/jean/.ssh && chown -R jean /home/jean
echo “[contents of public key]” > /home/jean/.ssh/authorized_keys

There is already a /home/jean/.ssh/authorized_keys because with the webui i assigned him a sshkey.

In that case confirm that the public key exists in it. If it does confirm that the permissions are as follows with ls -l
-rw------- and that it’s owned by “jean” (should be the 3rd column). If that’s the case then check /var/log/auth.log for errors.