0

I am running a Godaddy server. i followed following steps for ssh

  1. Created ssh key on Godaddy and authorized them.
  2. Saved pub key Note: my public key name is test
  3. Used putty to log in

Now the problem is that I have logged into the server got in my public_html/test directory

Here I initialized my git but whenever I try to pull it denies permission

eval $(ssh-agent -s)  
ssh-add ~/.ssh/test

After doing this it allows me to pull from git repo but I have to add this again and again. I even have added this to my authorized keys but it didn't work.

Is there any way to permanently add this key?

closed as off-topic by mikewhatever, Eric Carvalho, user117103, pa4080, waltinator Nov 6 '17 at 3:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – mikewhatever, Eric Carvalho, guntbert, pa4080, waltinator
If this question can be reworded to fit the rules in the help center, please edit the question.

1

You could either move SSH agent to your PC and use Agent Forwarding, or not use a SSH agent at all.

Using SSH Agent on your PC and agent forwarding instead of SSH Agent on the server

You can store your SSH private key for accessing Git on your PC (instead of on your server), and use SSH Agent Forwarding.

SSH Agent Forwarding is a feature of SSH, which allows access from your GoDaddy server to your PC's SSH agent through your SSH (PuTTY) connection. With SSH Agent Forwarding you do not need to start separate SSH agents on different machines, but only once and then 'forward' it to any machine you want to use SSH keys on.

Pageant is a SSH agent implementation that comes with the PuTTY suite.

To set it up:

  1. Start Pageant on you Windows PC (put a link into your 'Startup' folder to start it automatically when logging in to Windows)
  2. add the SSH private key you use for accessing Git to Pageant
  3. In PuTTY, edit the Saved Session for your GoDaddy server: Check "Allow agent forwarding" (under Connection -> SSH -> Auth)
  4. Connect to your GoDaddy server using PuTTY with this session configuration you just adjusted
  5. to confirm SSH Agent Forwarding now works: Run ssh-add -l on your GoDaddy server

Relevant sections in PuTTY's documentation:

Using Git with SSH public key authentication but no SSH agent

SSH client's (incl. Git) will per default look for keys ~/.ssh/id_rsa, ~/.ssh/id_dsa a.s.o.

If you rename your private and public keys to ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub (replace rsa with the key type you are using if it is not RSA)., your git should try those directly - without the need for ssh-agent.

  • thanks for you answer but i dnt have any problem connecting my pc with godaddy. MY problem is connecting my godaddy git folder with my github repo. I just don't want to add ssh again and again to pull on godaddy server – Zulfiqar Tariq Oct 20 '17 at 14:30
  • 1
    Exactly. PuTTY allows your git/ssh client on you GoDaddy server to access the SSH agent on your Windows PC. Thus no need for SSH agent on GoDaddy server. – sborsky Oct 23 '17 at 13:42
  • yea when i named my key id_rsa then it works fine but why dont it work when i name it techtraks pr some other name – Zulfiqar Tariq Oct 31 '17 at 5:16

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