# SSH-Agent can't open a connection to authentication agent?

When I SSH into my firewall server, then attempt to ssh into another machine on the local network from there I get the following error:

Could not open a connection to your authentication agent.

Is there a way that I can have the agent run correctly from within another SSH session?

-

I addition to what txwikinger said, you can also just use the -A command line option when SSHing to your firewall.

-
This works, thanks. Do you know what the correct option is to make this a default in .ssh/config? –  Rob Oct 13 '10 at 18:41
Add ForwardAgent yes to the .ssh/config for that Host to default to the -A flag –  Rob Oct 13 '10 at 18:44
You can also try this "eval ssh-agent". –  Marky Dec 4 '12 at 3:45

Yes. you can enable agent-forwarding by adding

ForwardAgent Yes


in your ssh configuration file (either ~/.ssh/config for user or /etc/ssh/ssh_config system wide.

Alternatively, if ssh is called with the option -A, the agent forwarding is also enabled as pointed out in the other answer.

-
However, be aware of possible security issues with using SSH agent forwarding: unixwiz.net/techtips/ssh-agent-forwarding.html#sec There's a reason why they are disabled by default, and they should only be enabled for trusted hosts/networks. –  Riccardo Murri Oct 13 '10 at 16:22
This is not a problem of enabling AgentForwarding. This is a problem of access to a private key via a unix socket. –  txwikinger Oct 13 '10 at 18:18
that option doesn't seem to be supported for this version of ssh (10.04) –  Rob Oct 13 '10 at 18:39
Sorry. I think I did some wrong pasting. I have corrected it. I use this with 10.04 and 10.10 without any problems. –  txwikinger Oct 13 '10 at 18:42
Yes, that is the correct option. thanks. –  Rob Oct 13 '10 at 18:45