To symlink SSH_AUTH_SOCK on boot to system-wide switch the value from default ssh agent:
- Change
/opt/homebrew/
to the correct homebrew path (/opt/homebrew
is for Apple Silicon and/usr/local
for x86) - Change the ssh agent as needed, this example uses https://github.com/FiloSottile/yubikey-agent
- Save as
~/Library/LaunchAgents/link-ssh-auth-sock.plist
- Run
launchctl load -F ~/Library/LaunchAgents/link-ssh-auth-sock.plist
Technique taken from: https://evilmartians.com/chronicles/stick-with-security-yubikey-ssh-gnupg-macos