I'm trying to connect to my host using SSH key. I've generated a key pair and added public key to authorized keys to the server.
However I'm unable to connect to server using my private key. Every time I connect it asks for the password.
I've tried to run ssh-add my_key_name
and it said that it's fine and been added. But it is not working.
Also I've tried to add to my config
Host alias
HostName host
User user_name
IdentityFile ~/.ssh/id_rsa
It also is not working. ssh alias
working but still asks for password.
-vvv
verbose flag to give you logging during connections usually shows exactly why it's not working. Additionally, logging into the server, and tailing the secure.log is another great resource if it does indeed happen to be a server misconfiguration. 99% of the time, though, it's a permissions issue on your local machine.