Skip to content

Instantly share code, notes, and snippets.

@christos
Forked from rjocoleman/README.md
Created March 15, 2022 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christos/d1197456cda13bcb4a33c66d704af263 to your computer and use it in GitHub Desktop.
Save christos/d1197456cda13bcb4a33c66d704af263 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