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/homebrewis for Apple Silicon and/usr/localfor 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
