Forum Discussion

andyalv's avatar
andyalv
New Contributor
11 months ago

SSH agent isn't working (Windows 11)

I can't use my vault's SSH keys on my terminal. I've reinstalled multiple times and followed the https://developer.1password.com/docs/ssh/get-started/, but I can't make it work correctly.

My 1Password config is set up as follows:

1Password SSH config1Password version

I've disabled the OpenSSH Authentication Agent (the screenshot is in spanish)

OpenSSH Authentication Agent. Startup Type: Disabled; Service Status: Stopped.

My ~/.ssh/config file:

Host *
    IdentityAgent "~/.1password/agent.sock"


My ~/.gitconfig file:

[core]
	sshCommand = ssh.exe
	autocrlf = input
[user]
	email = {email}
	name = {user}
	signingkey = ssh-ed25519 AAA[...]
[gpg]
	format = ssh
[gpg "ssh"]
	program = C:\\Users\\{user}\\AppData\\Local\\1Password\\app\\8\\op-ssh-sign.exe
[commit]
	gpgsign = true

 

Whenever I run ssh-add -L my vault's SSH keys are shown, but I can't seem to make it work with GitHub or connect to any SSH connection.

❯ ssh-add -L ssh-ed25519 AA[...] Authentication & Signing (Git) ssh-ed25519 AA[...] Authentication 
❯ ssh -Tv git@github.com 
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Reading configuration data C:\\Users\\{user}/.ssh/config
debug1: C:\\Users\\{user}/.ssh/config line 1: Applying options for *
debug1: Connecting to github.com [140.82.116.4] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\{user}/.ssh/id_rsa type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_ecdsa type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_ecdsa_sk type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_ed25519 type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_ed25519_sk type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_ed25519_sk-cert type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_xmss-cert type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\{user}/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.5
debug1: Remote protocol version 2.0, remote software version 133e47a51
debug1: compat_banner: no match: 133e47a51
debug1: Authenticating to github.com:22 as 'git'
debug1: load_hostkeys: fopen C:\\Users\\{user}/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\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: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> 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\\{user}/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\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\\{user}/.ssh/known_hosts:3
debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: C:\\Users\\{user}/.ssh/id_rsa
debug1: Will attempt key: C:\\Users\\{user}/.ssh/id_ecdsa
debug1: Will attempt key: C:\\Users\\{user}/.ssh/id_ecdsa_sk
debug1: Will attempt key: C:\\Users\\{user}/.ssh/id_ed25519
debug1: Will attempt key: C:\\Users\\{user}/.ssh/id_ed25519_sk
debug1: Will attempt key: C:\\Users\\{user}/.ssh/id_xmss
debug1: Will attempt key: C:\\Users\\{user}/.ssh/id_dsa
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: C:\\Users\\{user}/.ssh/id_rsa
debug1: Trying private key: C:\\Users\\{user}/.ssh/id_ecdsa
debug1: Trying private key: C:\\Users\\{user}/.ssh/id_ecdsa_sk
debug1: Trying private key: C:\\Users\\{user}/.ssh/id_ed25519
debug1: Trying private key: C:\\Users\\{user}/.ssh/id_ed25519_sk
debug1: Trying private key: C:\\Users\\{user}/.ssh/id_xmss
debug1: Trying private key: C:\\Users\\{user}/.ssh/id_dsa
debug1: No more authentication methods to try.
git@github.com: Permission denied (publickey).

One thing I noticed is that the folder .1password with the agent.sock file is not being created on my %USERPROFILE% folder. 

❯ cd ~ && lsd -la | findstr ".1password" 
{empty}

I installed lsd (chocolatey) on windows btw

6 Replies

  • reelfish's avatar
    reelfish
    New Contributor

    I have the same exact problem. Tried everything to fix. Still no luck. `ssh-add -l` even lists all my keys correctly. It just isn't activating. 

    • reelfish's avatar
      reelfish
      New Contributor

      Edit: I fixed this by creating a totally blank config file at C:\Users\yourusername\.ssh\config

      I have no idea why this works

      Edit 2: It appears you can still put host configuration data in your .ssh\config file on Windows, JUST MAKE SURE YOU DO NOT INCLUDE THESE LINES, OTHERWISE IT WILL NOT HOOK INTO 1PASSWORD'S SSH AGENT:

      IdentityAgent \\.\pipe\openssh-ssh-agent
      IdentitiesOnly yes

      ^
      DO NOT USE THOSE

      In fact looking at what Andyalv (thread starter) had in his config file:
      IdentityAgent "~/.1password/agent.sock"

      Was erroneous too. So do not make any reference to any IdentityAgents. 1password should do this for you in the background as soon as you enable the agent in the app (and you will NOT see a reference in config...it should just work..you know it is working by running ssh-add -l and seeing your 1pass SSH keys listed). 

    • reelfish's avatar
      reelfish
      New Contributor

      I see this in my 1password logs (%LOCALAPPDATA%\1password\logs):

      ERROR 2026-03-17T20:54:51.049+00:00 ThreadId(26) [1P:ssh\op-ssh-config\src\lib.rs:310] Failed to get SSH agent socket path.