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

PurplProto's avatar
PurplProto
Occasional Contributor
3 years ago

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

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

  • PurplProto's avatar
    PurplProto
    Occasional Contributor

    For added sanity, just to ensure we're using Microsoft's SSH and not the Gitbash SSH

    sh
    PS C:\Users\PurplProto> (gcm ssh.exe).Path
    C:\Windows\System32\OpenSSH\ssh.exe

  • PurplProto's avatar
    PurplProto
    Occasional Contributor
    Both unset (_click to expand_) ```sh PS C:\Users\PurplProto> dir .\.ssh\ Directory: C:\Users\PurplProto\.ssh Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 24/03/2022 16:47 backup -a---- 08/02/2022 22:07 10 authorized_keys -a---- 22/03/2022 15:22 2426 known_hosts -a---- 16/02/2022 23:40 507 known_hosts.old PS C:\Users\PurplProto> Remove-Item Env:SSH_AUTH_SOCK PS C:\Users\PurplProto> echo $env:SSH_AUTH_SOCK PS C:\Users\PurplProto> ssh -Tv git@github.com OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 debug1: Connecting to github.com [140.82.121.4] port 22. debug1: Connection established. # Redacted most of the log to fit within post charecter limit 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). PS C:\Users\PurplProto> ```
    With only SSH_AUTH_SOCK set (_click to expand_) ```sh PS C:\Users\PurplProto> dir .\.ssh\ Directory: C:\Users\PurplProto\.ssh Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 24/03/2022 16:47 backup -a---- 08/02/2022 22:07 10 authorized_keys -a---- 22/03/2022 15:22 2426 known_hosts -a---- 16/02/2022 23:40 507 known_hosts.old PS C:\Users\PurplProto> $env:SSH_AUTH_SOCK = '\.\pipe\openssh-ssh-agent' PS C:\Users\PurplProto> echo $env:SSH_AUTH_SOCK \.\pipe\openssh-ssh-agent PS C:\Users\PurplProto> ssh -Tv git@github.com OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 debug1: Connecting to github.com [140.82.121.4] port 22. debug1: Connection established. # Redacted most of the log to fit within post charecter limit 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). PS C:\Users\PurplProto> ```
    With only IdentityAgent set (_click to expand_) ```sh PS C:\Users\PurplProto> dir .\.ssh\ Directory: C:\Users\PurplProto\.ssh Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 24/03/2022 16:47 backup -a---- 08/02/2022 22:07 10 authorized_keys -a---- 22/03/2022 15:22 2426 known_hosts -a---- 16/02/2022 23:40 507 known_hosts.old PS C:\Users\PurplProto> Remove-Item Env:SSH_AUTH_SOCK PS C:\Users\PurplProto> echo $env:SSH_AUTH_SOCK PS C:\Users\PurplProto> ssh -Tvo "IdentityAgent=\.\pipe\openssh-ssh-agent" git@github.com OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 debug1: Connecting to github.com [140.82.121.4] port 22. debug1: Connection established. # Redacted most of the log to fit within post charecter limit 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). PS C:\Users\PurplProto> ```

    Still no luck here 😥

  • floris_1P's avatar
    floris_1P
    Icon for 1Password Team rank1Password Team

    And if you try it from PowerShell again, with IdentityAgent or SSH_AUTH_SOCK unset?

    And what happens if you run with IdentityAgent or SSH_AUTH_SOCK set to \\.\pipe\openssh-ssh-agent?

  • PurplProto's avatar
    PurplProto
    Occasional Contributor

    Hey, thanks for the reply!

    Sorry for my delayed reply, I've added the terminal log below 😊

    terminal log (_click to expand_) ```sh PurplProto@Corvo:~$ ls .ssh/ authorized_keys backup config known_hosts known_hosts.old PurplProto@Corvo:~$ # Backup folder contains my keys. Moved in there for the purpose of testing that 1Pass ssh-agent is working PurplProto@Corvo:~$ unset SSH_AUTH_SOCK PurplProto@Corvo:~$ echo $SSH_AUTH_SOCK PurplProto@Corvo:~$ head -n 4 .ssh/config Host * ServerAliveInterval 60 # IdentityAgent "~/.1password/agent.sock" PurplProto@Corvo:~$ # Commented out the IdentityAgent line PurplProto@Corvo:~$ ssh -Tv git@github.com OpenSSH_8.8p1, OpenSSL 1.1.1m 14 Dec 2021 debug1: Reading configuration data /c/Users/PurplProto/.ssh/config debug1: /c/Users/PurplProto/.ssh/config line 1: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config debug1: Connecting to github.com [140.82.121.4] 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_ecdsa_sk type -1 debug1: identity file /c/Users/PurplProto/.ssh/id_ecdsa_sk-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_ed25519_sk type -1 debug1: identity file /c/Users/PurplProto/.ssh/id_ed25519_sk-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_8.8 debug1: Remote protocol version 2.0, remote software version babeld-4f04c79d debug1: compat_banner: no match: babeld-4f04c79d debug1: Authenticating to github.com:22 as 'git' debug1: load_hostkeys: fopen /c/Users/PurplProto/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ssh-ed25519 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: SSH2_MSG_KEX_ECDH_REPLY received debug1: Server host key: ssh-ed25519 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU debug1: load_hostkeys: fopen /c/Users/PurplProto/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: Host 'github.com' is known and matches the ED25519 host key. debug1: Found key in /c/Users/PurplProto/.ssh/known_hosts:3 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: 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_ecdsa_sk debug1: Will attempt key: /c/Users/PurplProto/.ssh/id_ed25519 debug1: Will attempt key: /c/Users/PurplProto/.ssh/id_ed25519_sk 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_ecdsa_sk debug1: Trying private key: /c/Users/PurplProto/.ssh/id_ed25519 debug1: Trying private key: /c/Users/PurplProto/.ssh/id_ed25519_sk debug1: Trying private key: /c/Users/PurplProto/.ssh/id_xmss debug1: No more authentication methods to try. git@github.com: Permission denied (publickey). PurplProto@Corvo:~$ ssh-add -l Could not open a connection to your authentication agent. PurplProto@Corvo:~$ ```

    EDIT:
    Just in case my config was causing any issues, I temporarily removed it and tried the GitHub key test again:

    Just having IdentityAgent set (_click to expand_) ```sh PurplProto@Corvo:~$ ls .ssh/ authorized_keys backup known_hosts known_hosts.old PurplProto@Corvo:~$ echo $SSH_AUTH_SOCK PurplProto@Corvo:~$ ssh -Tvo "IdentityAgent=~/.1password/agent.sock" git@github.com # Redacted most of the log otherwise post would be too long debug1: No more authentication methods to try. git@github.com: Permission denied (publickey). PurplProto@Corvo:~$ ```
    Just having SSH_AUTH_SOCK set (_click to expand_) ```sh PurplProto@Corvo:~$ ls .ssh/ authorized_keys backup known_hosts known_hosts.old PurplProto@Corvo:~$ echo $SSH_AUTH_SOCK PurplProto@Corvo:~$ SSH_AUTH_SOCK=~/.1password/agent.sock ssh -Tv git@github.com # Redacted most of the log otherwise post would be too long debug1: No more authentication methods to try. git@github.com: Permission denied (publickey). PurplProto@Corvo:~$ ```
  • floris_1P's avatar
    floris_1P
    Icon for 1Password Team rank1Password Team

    Thanks for the detailed report! Could you try unsetting SSH_AUTH_SOCK and IdentityAgent? And then share your ssh -v output and ssh-add -l output?