Signing back into the Community for the first time? You'll need to reset your password to access your account.  Find out more.

Forum Discussion

stonesbg's avatar
stonesbg
New Contributor
2 months ago

1Password SSH Agent how to set specific ssh key

I have a few different ssh keys that are used for git and would like to have it set so that if going through one github organization i force one key if going to a personal account it uses a different key.

Is there any way as part of the IdentityAgent to specify the appropriate key or is the option just to keep cycling through the prompts for ssh keys?


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser: Not Provided

  • You can specify which key to use for which host in ~/.ssh/config using IdentityFile option, where the identity file is the public key to use and the private key is stored in 1Password. You may also need to specify IdentitiesOnly yes.

    Example for user99@example.com:


    Host example.com
    User user99
    IdentityFile ~/.ssh/identity.pub
    IdentitiesOnly yes

    More here:
    https://linux.die.net/man/5/ssh_config