ssh-agent and IdentityFile

Ángel González keisial at gmail.com
Thu Dec 15 08:54:30 EST 2011


On 13/12/11 23:52, Tony Kay wrote:
> Once ssh-agent has the usera or userb key installed, it ignores the
> config...meaning I have to do a lot of shuffling with ssh-add...and
> I've lost the benefit of using ssh-agent at all...worse, now I'm
> typing ssh-add -D, followed by ssh-add identity, followed by the
> password again! I just end up killing ssh-agent and typing
> passwords....unless I'm on OSX, which auto-starts ssh-agent every time
> I use ssh.
You could do
SSH_AUTH_SOCK= ssh hostAAdmin

You would be effectively disabling the ssh agent (by emptying the
SSH_AUTH_SOCK env var to the child ssh process),
which means that you will need to enter the password manually. Still,
seems better than the current approach.

A more advanced approach would be to have two ssh agents on different
sockets, and switch among them, playing or
perhaps with wrappers, or having SSH_AUTH_SOCK point to a symlink that
you repoint to one or another as you change
hats.

I know it doesn't solve the underlying problem (yes, it looks like a
bug), but hopefully it can make your life a bit easier.



More information about the openssh-unix-dev mailing list