-
Notifications
You must be signed in to change notification settings - Fork 73
Description
This project is heading in a good direction, but I'm not entirely happy with the ways the identity is selected. I'd like to be able to issue a command to select which identity I want to use. I'd also like to be able to list identities, and the keys loaded in them. I'm imagining something like the following:
# switch to using the 'work' identity. This probably needs a bash alias
ssh-ident work
# without the alias we'd need to source the output of a command (or set an environment var)
`ssh-ident work`
# interactive selection ?
ssh-ident -i
# with no arguments, list known identities
ssh-ident
# list the loaded keys of the current identity (presumably needs an aliased ssh-add command)
ssh-add -L
ssh-ident work
would output shell commands, which in turn would set and export environment variables. There could be an environment variable naming the identity, caught later by ssh-ident, or environment variables for consumption by openssh could be set (e.g. SSH_AUTH_SOCK
).
I've chosen to address ssh-ident directly by it's own name for setting the identity, which means putting the executable or a symlink with that name in the path. I figure ssh-ident could also get a couple of extra bits of functionality like listing the identities it knows about, whether they are running, and what keys are loaded.