Skip to main content
PurplProto
March 23, 2022
Question

I can't get 1Pass ssh-agent working at all on Windows

  • March 23, 2022
  • 15 replies
  • 6772 views

I tried following the SSH doc linked on the blog post for this update, but I can't get it working at all 😣.

For the prerequisite requirements:

I was previously on the beta channel, before running the uninstaller and reinstalling from the prod release on the downloads page, this didn't change anything though.


Yes, I'm running 1Password 8 (click to expand)

I have the OpenSSH Client installed (_click to expand_) ![](https://us.v-cdn.net/5020219/uploads/editor/44/n2pzcscrfydj.png "")

For step 1:

I opted to import my existing keys (_click to expand_) ![](https://us.v-cdn.net/5020219/uploads/editor/3d/dbzzobsntncq.png "")

Step 2:

I skipped, as I already have my key there.

Step 3:

I already had OpenSSH installed (not sure how or when, but it's there) and it was also already disabled (_click to expand_) ![](https://us.v-cdn.net/5020219/uploads/editor/h1/t6ku9jzdm8v2.png "")
I've enabled the SSH settings options in the 1Password app (_click to expand_) ![](https://us.v-cdn.net/5020219/uploads/editor/cf/2m5xu1u0gso3.png "")

Step 4:

Configured the agent


In Gitbash (click to expand)

In PowerShell (_click to expand_) ![](https://us.v-cdn.net/5020219/uploads/editor/ch/f14gg1eewvqp.png "")

Step 5

Failure across the board. No Git actions or SSH actions work.


Just to prove the key is on my account, it's the same key I've used for well over a year 😄 (click to expand)

Debug time!

The GitHub key check, but verbose (_click to expand_) > PS C:\Users\PurplProto> ssh -vT git@github.com > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 > debug1: Reading configuration data C:\\Users\\PurplProto/.ssh/config > debug1: C:\\Users\\PurplProto/.ssh/config line 1: Applying options for * > debug1: Connecting to github.com [140.82.121.3] port 22. > debug1: Connection established. > debug1: identity file C:\\Users\\PurplProto/.ssh/id_rsa type -1 > debug1: identity file C:\\Users\\PurplProto/.ssh/id_rsa-cert type -1 > debug1: identity file C:\\Users\\PurplProto/.ssh/id_dsa type -1 > debug1: identity file C:\\Users\\PurplProto/.ssh/id_dsa-cert type -1 > debug1: identity file C:\\Users\\PurplProto/.ssh/id_ecdsa type -1 > debug1: identity file C:\\Users\\PurplProto/.ssh/id_ecdsa-cert type -1 > debug1: identity file C:\\Users\\PurplProto/.ssh/id_ed25519 type -1 > debug1: identity file C:\\Users\\PurplProto/.ssh/id_ed25519-cert type -1 > debug1: identity file C:\\Users\\PurplProto/.ssh/id_xmss type -1 > debug1: identity file C:\\Users\\PurplProto/.ssh/id_xmss-cert type -1 > debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1 > debug1: Remote protocol version 2.0, remote software version babeld-4f04c79d > debug1: no match: babeld-4f04c79d > debug1: Authenticating to github.com:22 as 'git' > debug1: SSH2_MSG_KEXINIT sent > debug1: SSH2_MSG_KEXINIT received > debug1: kex: algorithm: curve25519-sha256 > debug1: kex: host key algorithm: ecdsa-sha2-nistp256 > debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: compression: none > debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: none > debug1: expecting SSH2_MSG_KEX_ECDH_REPLY > debug1: Server host key: ecdsa-sha2-nistp256 SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM > debug1: Host 'github.com' is known and matches the ECDSA host key. > debug1: Found key in C:\\Users\\PurplProto/.ssh/known_hosts:5 > debug1: rekey out after 134217728 blocks > debug1: SSH2_MSG_NEWKEYS sent > debug1: expecting SSH2_MSG_NEWKEYS > debug1: SSH2_MSG_NEWKEYS received > debug1: rekey in after 134217728 blocks > debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory > debug1: Will attempt key: C:\\Users\\PurplProto/.ssh/id_rsa > debug1: Will attempt key: C:\\Users\\PurplProto/.ssh/id_dsa > debug1: Will attempt key: C:\\Users\\PurplProto/.ssh/id_ecdsa > debug1: Will attempt key: C:\\Users\\PurplProto/.ssh/id_ed25519 > debug1: Will attempt key: C:\\Users\\PurplProto/.ssh/id_xmss > debug1: SSH2_MSG_EXT_INFO received > debug1: kex_input_ext_info: server-sig-algs= > debug1: SSH2_MSG_SERVICE_ACCEPT received > debug1: Authentications that can continue: publickey > debug1: Next authentication method: publickey > debug1: Trying private key: C:\\Users\\PurplProto/.ssh/id_rsa > debug1: Trying private key: C:\\Users\\PurplProto/.ssh/id_dsa > debug1: Trying private key: C:\\Users\\PurplProto/.ssh/id_ecdsa > debug1: Trying private key: C:\\Users\\PurplProto/.ssh/id_ed25519 > debug1: Trying private key: C:\\Users\\PurplProto/.ssh/id_xmss > debug1: No more authentication methods to try. > git@github.com: Permission denied (publickey).
Check if the pipe even exists (spoiler, apparently it doesn't) (click to expand) > PS C:\Users\PurplProto> (get-childitem \\.\pipe\openssh-ssh-agent).FullName > get-childitem : Cannot find path '\\.\pipe\openssh-ssh-agent' because it does not exist. > At line:1 char:2 > + (get-childitem \\.\pipe\openssh-ssh-agent).FullName > + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + CategoryInfo : ObjectNotFound: (\\.\pipe\openssh-ssh-agent:String) [Get-ChildItem], ItemNotFoundException > + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
Then searching the logs folder for "ssh" seems to only yield the agent starting message. I've never seen an auth prompted as described in the blog post at all 😥 (_click to expand_) ![](https://us.v-cdn.net/5020219/uploads/editor/o2/vs8cyemgzv6f.png "")

And yes, I've tried turning it off and on again, both the SSH options in 1Password and my PC. 😁

It's like the 1Pass ssh-agent doesn't exist at all 🙁 What's going wrong here?


1Password Version: 8.6.0
Extension Version: 2.3.0
OS Version: Windows 10 21H2

15 replies

PurplProto
April 6, 2022

@floris_1P Sorry for the delayed reply, been busy with work.

I used tail inside Gitbash on the current log file, disabling and then enabling does print a single line saying the agent has started

INFO 2022-04-06T11:05:12.662 tokio-runtime-worker(ThreadId(10)) [1P:ssh\op-agent-controller\src\desktop.rs:285] SSH Agent has started.

PurplProto
April 6, 2022

@subzero2000 They are all in my private vault, I don't have a "personal" vault. I only have 3 vaults, "private", "shared", and "work". work is the only vault I created.

April 14, 2022

I've got the same issue as @PurplProto. I'll run through all of the debug steps tomorrow and follow up if I get a different result.

April 24, 2022

Just to follow up that this eventually did start to work. All I can assume is that it was fixed by "turning it off and on again".

PurplProto
May 16, 2022

I've tried this again since I got it working on my laptop right away after I did a much needed format on there. I have successfully been able to get this working on my desktop now as well where I was having the previous issues.

I believe what the issue seems to be was I'd been using ssh -Tv git@github.com in GitBash which was always failing. It seems 1Password's agent doesn't work with GitBash's ssh binary directly, which now also seems obvious to me after remembering one of the install steps is to set the sshCommand in the Git config to that of the Windows binary, so running the SSH test for GitHub here will naturally fail. I've repeated this same test in CMD so it's using Windows OpenSSH instead and that works, I can even access my servers from there too, yay! 🎉

I would certainly like to get this working in GitBash though as I prefer to use bash-like tools over Windows' equivalents. I think for this, setting the Windows' OpenSSH in the path environment variable before GitBash's SSH binary should do the trick for now, but maybe finding a way to add the \\.\pipe\openssh-ssh-agent to GitBash's environment would be nicer. I'm not well versed with pipes, but I've read someone had success using socat, though it looked like a rather over-complicated solution to the issue, so I won't bother trying that.

TL;DR
I was testing if 1Password's agent was working using SSH inside GitBash, though 1Password's agent only works with Windows' OpenSSH. The only way this works for Git inside GitBash is because an install step added a config option to Git to instruct it to use Windows' OpenSSH instead.