ssh agent forwarding with many identities
Posted
by
Eddified
on Super User
See other posts from Super User
or by Eddified
Published on 2013-10-22T21:21:01Z
Indexed on
2013/10/22
21:57 UTC
Read the original article
Hit count: 412
I have setup ssh agent forwarding, and I know it works. I also have many keys setup in the agent. The problem is there are so many keys that I get:
Received disconnect from XXX.XXX.XXX.XXX: 2: Too many authentication failures for bob
The way around this is to use IdentitiesOnly=yes
so that ssh will only send the identity you want it to for the specified host. I've also gotten this implemented and I know it works, without agent forwarding.
Now, I'm trying to combine the two features. That is, I want to use agent forwarding, but also be able to specify which identity to use when connecting. Problem is, I can't figure out how to do this.
So, I want to connect from box A through box B to box C. Box A has all of the identity files and the ssh agent running. I want to edit box A or B's ssh config file(s) to use a specific identity that exists in box A's agent (which is being forwarded).
© Super User or respective owner