I've been trying to setup my forward agent on my device so I can Git commit & git push from a remote server.

I go through the normal commands to get setup:

eval "$(ssh-agent)"

If I do ssh-add -l on my local machine I can see both keys have been added.

I then go to ssh to my server, e.g. ssh server.compang.co.uk -A

And now if I do ssh-add -l I get the following error with my two keys listed below "RSA & DSA":

error fetching identities for protocol 1: agent refused operation

Any thoughts on how to get around this? I'm running out of ideas.

1 Answer 1


According to a hearsay, it's only a warning. To use private keys from the original machine 1 when logged in to another machine 2, one has to add them with ssh-add ~/.ssh/id_{rsa,ecdsa,...} to the ssh-agent session in machine 1. They will show up in the output of ssh-add -l on machine 2.

Connecting from machine 2 machine 3 does not need copying private keys, thanks to "agent forwarding". (Failing to connect from machine 2 to machine 3 may be due to missing the private key expected by machine 3 in the ssh-add command executed on machine 1).

I also found that there is no need to start ssh-agent on machine 2.


You must log in to answer this question.

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