Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm running a tinycore machine that I store my code on before pushing it to github. This is also the only machine that has port 22 forwarded at home so I have to do the push from this machine due to github using ssh as it's protocol for doing pushes and pulls. I was trying to do a push today and I've been getting permission denied (Publickey) errors, So I than read this page So I created a ssh config file at ~tc/.ssh/config with the following content:

Host github.com
    User git
    Hostname github.com
    PreferredAuthentications publickey
    IdentityFile /home/tc/.ssh/id_dsa.pub

And did am still having issues after attempting to re-generate my dsa key pair.

Basically, what I am seeing is that after I regenerate my dsa key pair after running

ssh-keygen -t dsa

I then confirm the overwrite, hit enter three times to use: default location /home/tc/.ssh/id_dsa (and id_dsa.pub in the same directory), and no passphrase. I than attempt to ssh to github to test the connection using ssh git@github.comand get the error:

Permission denied (publickey).

So I figured this was due to me not adding my newly generated public key to github. So, I cat the public key and copy the output into my settings on github, now every time I attempt to ssh to github It's asking me for a passphrase, even though I never specified one and it didn't ask me prior to viewing the file. Also, the permissions seem to be fine at rw only for user tc.

share|improve this question

1 Answer 1

up vote 5 down vote accepted
IdentityFile /home/tc/.ssh/id_dsa.pub

That should point to your private key, not your public key. The public key resides on the server you're connecting to.

share|improve this answer
    
Yep, thanks. Stupid little mistakes :( –  Ballistic Buddha May 10 '11 at 3:05
    
No prob. It happens to the best of us. –  EEAA May 10 '11 at 3:06

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.