Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
Former Member
4 years agoSSH Agent Forwarding
I'm really enjoying using 1Password as a ssh-agent with biometric unlock. I'm wondering if it's possible forward the SSH agent though.
Scenario:
I have two macs with 1Password setup with biomet...
Former Member
3 years agoI specify the forwarded agent explicitly when I need it (which is correctly set in the $SSH_AGENT_SOCK
environment variable):
shell
ssh -o IdentityAgent=$SSH_AUTH_SOCK your.host.name
For git, this would be (solving the OPs question):
shell
GIT_SSH_COMMAND="ssh -o IdentityAgent=$SSH_AUTH_SOCK" git push
Background: The agent forwarding works fine, but the IdentityAgent
setting in .ssh/config
takes precedence over the SSH_AUTH_SOCK
environment variable set by ssh. It seems to be possible to use environment variables in the .ssh/config
file as well (specifically for the IdentityAgent
setting), but I believe this won't work for non-terminal applications.
It's not perfect, but works for me.
HTH