1

First of all, I am not entirely sure if this is a problem with Ubuntu itself, but any insight would be helpful. I use Ubuntu 14.04. I have a git repo cloned over SSH, and normally I have no problems using it. But if I SSH into my machine, I am not able to reach the github server anymore.

enter image description here

4
  • How do you authenticate to the github?
    – Jakuje
    Jul 25, 2016 at 19:03
  • I have added my public key to my github account.
    – SPMP
    Jul 25, 2016 at 19:10
  • 1
    If you are using ssh-agent to store the publickey with which you authenticate to github on your GUI login, you need to ensure you have access to the same keys on an ssh login. What happens if you ssh -A santhosh@localhost , for example? Jul 25, 2016 at 19:10
  • That actually works! Could you tell me why this is happening?
    – SPMP
    Jul 25, 2016 at 19:12

1 Answer 1

3

Most probably you are using key stored in some non-standard location and added to your gnome-keyring.

Using ssh -A santhosh@localhost will forward the connection to your agent and you will be able to use the same identity withing ssh session.

Other way would be to specify the identity file in your ~/.ssh/config:

Host github.com
  IdentityFile path/to/key
2
  • Is there a way to find the key file that is currently being used?
    – SPMP
    Jul 25, 2016 at 19:16
  • 1
    When you open seahorse (gnome-keyring), you should see what keys are added there.
    – Jakuje
    Jul 25, 2016 at 19:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .