I added the public SSH key to the authorized_keys file. ssh localhost should log me in without asking for the password.
ssh localhost
I did that and tried t
Also be sure your home directory is not writeable by others:
chmod g-w,o-w /home/USERNAME
This answer is stolen from here.