Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
Former Member
3 years agoAuthenticate using CLI (non-gui)
I have enabled the 1Password SSH Agent which works fine, apart from one usecase: accessing my computer remotely and then trying to access other SSH hosts. It then prompts for a password using the GUI...
floris_1P
1Password Team
3 years agoWhat you could do is in your SSH config, enable SSH agent forwarding for the host you're connecting to:
Host myhost
ForwardAgent yes
Then on your target machine, only apply the 1Password socket without an existing SSH connection:
Match host * exec "test -z $SSH_CONNECTION"
IdentityAgent "~/.1password/agent.sock"
If there is an SSH connection, it should pick the forwarded SSH_AUTH_SOCK
. If you'd then run an SSH command, you'd get prompted on the original machine.