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 uploaded my public key to github and have my private key in ~/.ssh/id_rsa.

Even after adding RSAAuthentication=yes and PubkeyAuthentication=yes in ~/.ssh/config, ssh does not seem to try any of the private keys:

$ ssh -vT git@github.com
....
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.

I believe it is supposed to be something more like:

debug1: Authentications that can continue: publickey
debug1: Trying private key id_rsa...
debug1: No more authentication methods to try.

I believe I have the permissions on ~/.ssh and ~/.ssh/id_rsa set correctly:

/home/doriad/.ssh $ ls -al ~/.ssh
total 40
drwx------  2 doriad users  4096 Oct 16 16:05 .
drwx------ 81 doriad users 12288 Oct 16 13:22 ..
-rw-------  1 doriad users   174 Oct 16 16:05 config
-rw-------  1 doriad users   147 Oct 16 16:05 config~
-rw-------  1 doriad users  1679 Sep 23 11:45 id_rsa
-rw-------  1 doriad users   402 Sep 23 11:45 id_rsa.pub
-rw-r-----  1 doriad users  5979 Sep 23 11:37 known_hosts

Can anyone explain why it is not trying my private key?

share|improve this question
    
Can you share more of your .ssh/config with us? This should work out of the box, even without an .ssh/config, so I suspect it is something in there. –  wingedsubmariner Oct 16 '13 at 18:29
    
@wingedsubmariner My entire ~/.ssh/config is: RSAAuthentication yes PubkeyAuthentication yes –  David Doria Oct 16 '13 at 19:10
    
Those both default to yes, so they shouldn't matter. What about /etc/ssh/ssh_config? Anything not commented out in there? –  wingedsubmariner Oct 16 '13 at 19:14
    
Please add the output from ls -al ~/.ssh to your question. Permissions are often the culprit, SSH is pretty strict about key permissions. –  heavyd Oct 16 '13 at 19:19
    
@wingedsubmariner There was a line in my /etc/ssh/ssh_config like: PreferredAuthentications gssapi-with-mic,password,keyboard-interactive . I added PreferredAuthentications publickey to my ~/.ssh/config and then it worked correctly! I don't understand why it said "Trying private key id_rsa..." in my output if it was not trying to use the publickey authentication? –  David Doria Oct 17 '13 at 12:37

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.