Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.


I am working currently on my server on an issue, I configured the SSH Deamon that only people who have a valid ssh-key can login on to the server, and kicked the password option

Now I've added a user account git. I navigate to his home folder created the folder ".ssh" and created in that tolder the file "authorized_keys" I copied my public key in there.

Now on my local machine I added that identity (via ssh-add) and I wanted to connect to my server. but when I'm trying to login myself I can't the only message I get is "Permission denied (publickey)."

Could anyone help me out

P.S I also tried already to connect using the -v flag but there is nothing that really helps.. IMO

Thanks in advance!

share|improve this question
add comment

1 Answer

The authorized_keys file must have the appropriate ownership and access permissions. I believe it should be owned by the user you are logging in as and no one else should have write permissions.

You can turn up debugging in the SSH daemon using the -d option.

 -d      Debug mode.  The server sends verbose debug output to standard
         error, and does not put itself in the background.  The server
         also will not fork and will only process one connection.  This
         option is only intended for debugging for the server.  Multiple
         -d options increase the debugging level.  Maximum is 3.

See this article

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.