Skip to main content
June 18, 2022
Question

SSH Agent Not Working on macOS 12.4

  • June 18, 2022
  • 11 replies
  • 2864 views

After following this guide: https://developer.1password.com/docs/ssh/get-started , I enabled the SSH Agent on mac0S and I added the agent config to ~/.ssh/config as prescribed in Step 4 and verified that everything was enabled as prescribed in Step 3:

However, I'm not able to authenticate. When I go to SSH, I get the following error:

```
user@computer Downloads % ssh user@server -L 2244:localhost:2244
sign_and_send_pubkey: signing failed for RSA "id_rsa_key1" from agent: agent refused operation
user@server: Permission denied (publickey).

```
When I run that, I get a prompt to use TouchID and then I get the failure message shown above.

I checked the key and confirmed that its RSA:


user@computer Downloads % ssh-keygen -l -f id_rsa_key1.key
4096 SHA256:********** no comment (RSA)

I also checked for identities and get nothing:


user@computer Downloads % ssh-add -l
The agent has no identities

Any idea what I'm doing wrong?


1Password Version: 8.7.1
Extension Version: Not Provided
OS Version: macOS 12.4

11 replies

wavesoundAuthor
June 19, 2022

I should add that in my case. I have two 1Password.com Accounts configured. The SSH key item is in the Private vault of one of the configured accounts. Could this be related to having two 1Password.com accounts?

June 20, 2022

Similar here. I had it actually working but then somehow the 1password agent stopped working, or rather running git started to request password in the CLI. I think this happened after I enabled biometric authentication for 1Password. I have now restarted my computer but still it does not work and git asks for the password in the CLI.

June 21, 2022

It is hard to troubleshoot without any troubleshooting instructions from 1Password :'( When I check the agent.sock that 1Passord asked me to add to my ssh config, I see it does not exist:


ls ~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock
ls: /Users/me/Library/Group: No such file or directory
ls: Containers/2BUA8C4S2C.com.1password/t/agent.sock: No such file or directory

I have no idea whether that is a sign of a problem or expected.

June 21, 2022

Update: I fixed my problem - it stopped working b/c I moved the ssh key into a vault other than Personal or Private. Moving it back fixed the agent.

June 21, 2022

@holyjak glad to see you were able to resolve the problem you were having!

@wavesound I'd like to get a bit more info regarding your setup. Would you be able to submit an SSH diagnostics report as described in https://developer.1password.com/docs/ssh/agent/troubleshooting/?

wavesoundAuthor
June 21, 2022

Hi @"jody.h_1P"

I followed those steps. Upon my SSH connection and 1Password prompted me for Touch ID and then failed. However, no files are being placed in ~/Library/Group\ Containers/2BUA8C4S2C.com.1password/Library/Application\ Support/1Password/Data/ssh-diagnostics

wavesoundAuthor
June 28, 2022

@"jody.h_1P" Any other thoughts?

floris_1P
1Password Employee
June 29, 2022

@wavesound Do you see anything appear in the 1Password logs when running an SSH command? On macOS: ~/Library/Group Containers/2BUA8C4S2C.com.1password/Library/Application Support/1Password/Data/logs/1Password_rCURRENT.log

wavesoundAuthor
August 9, 2022

Hi @floris_1P, that file doesn't exist and never gets created.


wavesound@computer ~ % cat ~/Library/Group Containers/2BUA8C4S2C.com.1password/Library/Application Support/1Password/Data/logs/1Password_rCURRENT.log
cat: /Users/wavesound/Library/Group: No such file or directory
cat: Containers/2BUA8C4S2C.com.1password/Library/Application: No such file or directory
cat: Support/1Password/Data/logs/1Password_rCURRENT.log: No such file or directory

August 10, 2022

Hi @wavesound!

Could you try escaping the spaces with backslashes like so?

cat ~/Library/Group\ Containers/2BUA8C4S2C.com.1password/Library/Application\ Support/1Password/Data/logs/1Password_rCURRENT.log