Key Selection with agent

Ángel González keisial at gmail.com
Fri Oct 10 06:41:27 EST 2014


On 06/10/14 02:50, Damien Miller wrote:
>> The Situation is following:
>>
>> Workstatation is running the Agent with some keys
>> Need to use a jump host to connect to other hosts.
> You can use something like the following in your ~/.ssh/config
>
> Host foo
> 	IdentitiesOnly yes
> 	IdentityFile ~/.ssh/id_foo.pub
>
> Host bar
> 	IdentitiesOnly yes
> 	IdentityFile ~/.ssh/id_bar.pub
>
> ssh will use the specified key from the agent, even if it offers others.

> Unfortunately there is no way to select/filter keys when an agent is
> forwarded yet.

However, I suspect he can get away with forwarding the agent by using a 
ProxyCommand:
> ProxyCommand ssh -W %h:%p bar


> It would be a nice feature though.
+1
I think someone sent some time ago to this list a script for switching 
agents
precisely for this kind of usecase. Maybe that's useful for you, Patrick.




More information about the openssh-unix-dev mailing list