1

Im struggling with setting up ssh-agent-forwarding.

What I want to do: I want to have my public key on a ubuntu-server, the private key locally on my windows machine. I want to connect to the ubuntu-server without having to type in my private-key password since its stored in the pagent. This part works flawless. The next part is the one that isn't working though.

After connecting to the ubuntu-server I want to git/ssh into other servers, only with the key that is on my windows machine in the pagent.

What I've done so far: I have a Windows Client with installed pagent. The key is set up in the windows machine. I can connect to the ubuntu-server and authorize over the private key that I've set up. Also I have activated "Allow agent forwarding" in putty.

Thats what my ssh_config looks like:

Host *
   ForwardAgent yes

What the problem is: When connected to the server and typing in "ssh-add -l" the server tells me: "The agent has no identities."

What have I forgotten?

2

First, check that the server allows agent forwarding (AllowAgentForwarding in sshd_config) and if not, allow it and restart the sshd service. Then double check that it is really enabled in the PuTTY. If both of them is fine inspect the debug log from putty. If it forwarding failed, there must be some information why.

0

I've found my problem.

I had

eval $(ssh-agent)

in my .bashrc.

After deleting that line, the forwarding started to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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