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:
- Start Pageant on you Windows PC
(put a link into your 'Startup' folder to start it automatically when logging in to Windows)
- add the SSH private key you use for accessing Git to Pageant
- In PuTTY, edit the Saved Session for your GoDaddy server: Check "Allow agent forwarding" (under Connection -> SSH -> Auth)
- Connect to your GoDaddy server using PuTTY with this session configuration you just adjusted
- 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
.