ssh agent does not list my keys despite $SSH_AUTH_SOCK set
I've seen previous discussions on this topic, like this one, however my current configuration has all the bits in that discussion.
So, here's my current setup and configurations:
- I have the 1password ssh agent running per the Settings -> Developer options in 1Password.
- The configuration (
~/.ssh/config
) has a Host * IdentityAgent pointing to"~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
, which I added automatically from the settings page - I added the global plist per this support page and loaded it. It did not complain about errors, so I assume it's working
- I restarted the computer since then
- I made sure my zshrc does not redeclare the SSH_AUTH_SOCKET environment variable
- fetching private repositores from the command line works, as 1password pops up and asks me to authorize the keys in the vault, and then succeeds in using them
- there are no keys as files in the
~/.ssh/
directory - I have an ssh agent configuration toml file which changes the order of the keys, but nothing else
$ echo $SSH_AUTH_SOCK
tells me it's set to/private/tmp/com.apple.launchd.IC5jFZHBxD/Listeners
(unsure whether this is due to the plist file?)ps aux | grep ssh-agent
tells me there's an ssh-agent process running at/usr/bin/ssh-agent -l
, I don't think this is 1passwords, and I don't know what starts this one
With the above, ssh-add -l
tells me the agent has no identities. Ideally I would like the command to list the keys that the 1password ssh agent has
1Password Version: 8.10.18
Extension Version: 2.16.0
OS Version: macOS 14.1
Browser: Arc (chrome)
Comments
-
Further, the ssh-agent is started by launchd, the value of
$SSH_AUTH_SOCK
is from that process. It's in the open files in the activity monitor.When I list the services that
launchd
starts withlaunchctl list
and then grep for the process ID of thessh-agent
, it is started bycom.openssh.ssh-agent
.That seems to be a mac built in openssh agent per https://gist.github.com/vancluever/de1c3985c8f9e2a3c4bdc42a057e075e (I found the plist in
/System/Library/LaunchAgents
) and https://discussions.apple.com/thread/78746750 -
So I guess the question is, how do I force my computer to use the 1Password ssh agent, and not its own built in ssh agent? 🤔
0 -
For the record if I manually add the
export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
line to the zsh config, reload, and make sure that the env var is that one,
ssh-add -l
works as intended and will list the keys 1password has.I'm having trouble getting the built in ssh agent to NOT start, and the SSH_AUTH_SOCK to not be set to the apple listener.
I've tried the launchctl bootout, disable, etc, to no avail.
0 -
I've come across the same issue. My
git
commands correctly make 1PW prompt for my authorization but anyssh
commands fail to do so.Have you found a solution to this since coming across the issue? I have not come further than the things you described above.
0 -
I have the exact same issue on a freshly setup Macbook, with the very same behaviour. the config file looks fine, but it just doesn't have any available identities and $SSH_AUTH_SOCKET also points to the apple listener.
0