1

Referencing this similar issue, which had good suggestions:

macOS keeps asking my ssh passphrase since I updated to Sierra

but this solution isn't working for Sonoma, and using git on a server. Used the following in .ssh/config:

AddKeysToAgent yes
UseKeychain yes

I removed the ssh key and started over - also tried the following:

ssh-add --apple-use-keychain ~/.ssh/id_rsa

is there some identity requirement here?

Joe
  • 111

1 Answers1

0

What finally worked for me on macOS Sonoma was this:

~/.ssh/config:

Host *
  IgnoreUnknown UseKeychain
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa

Then running these commands separately:

ssh-add --apple-use-keychain ~/.ssh/id_rsa
ssh-add --apple-load-keychain ~/.ssh/id_rsa

Oh, and if you have openssh installed, uninstall that or these commands will fail.

NeyLive
  • 101