Selecting specific key from agent

Ángel González keisial at gmail.com
Fri Jan 22 11:45:59 AEDT 2016


On 21/01/16 16:11, Christian Weisgerber wrote:
> On 2016-01-21, Ruediger Meier<sweet_f_a at gmx.de>  wrote:
>
>>> There are cases when a user might have multiple keys in ssh-agent,
>>> but wants to use a specific one. Unless I'm mistaken, this is
>>> currently impossible.
>> You can do that with option "IdentityFile", see "man ssh_config".
> That assumes that the key files are locally available.
>
> If you are on host A and want to connect to B, it is perfectly
> possible to have keys in the agent that were added on another host C.
>
Note you can provide to IdentityFile a file containing the *public* key. 
So no need to copy the key into B.

(Actually, it can also be beneficial, as not having the key in the agent 
will procude a failure, instead of ssh(1) requesting the key password, 
which is an UI that could be produced by a compromised server)



More information about the openssh-unix-dev mailing list