Skip to content

Instantly share code, notes, and snippets.

@rjocoleman
Created March 1, 2021 02:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rjocoleman/2a436740a52c6457c92c7a52ca831a9d to your computer and use it in GitHub Desktop.
Save rjocoleman/2a436740a52c6457c92c7a52ca831a9d to your computer and use it in GitHub Desktop.

To symlink SSH_AUTH_SOCK on boot to system-wide switch the value from default ssh agent:

  1. Change /opt/homebrew/ to the correct homebrew path (/opt/homebrew is for Apple Silicon and /usr/local for x86)
  2. Change the ssh agent as needed, this example uses https://github.com/FiloSottile/yubikey-agent
  3. Save as ~/Library/LaunchAgents/link-ssh-auth-sock.plist
  4. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment