This question already has an answer here:
- How to make password-less login work 2 answers
I have a ubuntu 16.04 server install that was initially installed with root user only so root users home directory is
/root. If I add another user such as bob bobs home directory is created in
/home/ as expected. If I want add a public key for bob to ssh in with, I add
/home/bob/.ssh/authorized_keys and put bobs public key in the authorized key file. Is this the correct way so far? Problem is when I try
Permission denied (publickey)
.ssh directory permissions are set to 700 and the
authorized_key file is set to 600. In my
sshd_config the path to the key file is the default
I set ssh logging to verbose but it only shows
Failed publickey for....
What could I be doing wrong? Is it only looking in
/root/.ssh for the key file?