OK, I know the basics of how to set up passwordless ssh: create a keypair using ssh-keygen then add the public key from id_dsa.pub into the host's .ssh/authorized_keys. So for two different machines client and host, I can ssh from client into host without entering a password. Good so far.
But I have some software which requires that client be able to ssh into itself without a password. Naively I do the same thing: simply copy .ssh/id_dsa.pub into .ssh/authorized_keys, same directory. But it doesn't work. If I type
user@client:~$ ssh client
then it still asks for my password, even though the public key of client is in its own authorized_keys file.
Am I missing something?
.ssh
directory and theauthorized_keys
file are only writable by the user, not by the group. If it still doesn't work, post the output ofssh -vvv client
. Also look at the server logs (e.g.,/var/log/auth.log
) if you have access to them.