Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
anishlr
3 years agoNew Contributor
Is it possible for 1Password CLI running on WSL to connect with 1Password hosted on Windows?
Right now I can access 1Password on my WSL Debian installation using the CLI. But I have to enter my master password even when Windows is authenticated. I was just curious if it's possible to connect the two (a-la the SSH agent forwarding magic outlined here - https://1password.community/discussion/128023/ssh-agent-on-windows-subsystem-for-linux)
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser:_ Not Provided
41 Replies
- Jack_P_1P
1Password Team
Hey folks,
Thanks for sharing your interest! I know it's something I'd love to see as well, so I'll add your feedback. 🙂
Jack
- kajojoNew Contributor
With the current lack of support for Windows side plugins (official and otherwise) it would be extremely useful to be able to get this working.
- Former Member
Also very interested by that! Trying the alias to op.exe for now.
- Former Member
You can use the Windows cli binary, which is already connected to the host's 1Password instance, to access the data.
alias op="op.exe"
Obviously, op.exe needs to be accessible via the host's PATH or the WSL's PATH, or you'll have to specify the full path to the binary in /mnt/c/.../.
Autocomplete works as well.
eval "$(op completion zsh)"; compdef _op op.exe
Unfortunately, this will only work for your own scripts because the binary's plugins still run on Windows and don't recognize the Linux shell, unless the plugin supports both platforms.
Here's a sudo alias:
alias sudo="sudo -S <<< $(op item get YOUR_ROOT_PASS_ID --fields label=password)"
Or, as a separate command, since
sudo -S
removes its interactivity.alias sudoauth="op item get YOUR_ROOT_PASS_ID --fields label=password | sudo -Sv"
- Former Member
Another +1 here
- Former Member
+1 name for the list if it helps. :)
- Jack_P_1P
1Password Team
Hey @thisdevdane:
I've added you as well! 🙂
Jack
- Former Member
Just to add to the list of people, that is something I wish for as well.
- Jack_P_1P
1Password Team
Hey @FWest98:
I've noted your interest as well. Thanks for reaching out!
Jack
- Former Member
I would be very interested in this feature as well! Especially with the shell plugins recently introduced, that would be a great combination of being able to connect to GitLab from my WSL shell using Hello authentication.