Files
minimal-setups/content/snippets/0300-ssh-keys-from-token-on-macos.md
Wolfgang Hottgenroth f96ebeb68d
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
new article
2025-12-24 17:22:00 +01:00

465 B

SSH Keys from Token on MacOS

Install gnupg and opensc using homebrew:

brew install gnupg
brew install opensc

Create gpg-agent.conf file in ~/.gnupg:

enable-ssh-support
pinentry-program /opt/homebrew/bin/pinentry-mac

default-cache-ttl 600
max-cache-ttl 7200
default-cache-ttl-ssh 600
max-cache-ttl-ssh 7200

Load agent in .bashrc:

SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
export SSH_AUTH_SOCK
gpg-connect-agent /bye