This commit is contained in:
29
content/snippets/0300-ssh-keys-from-token-on-macos.md
Normal file
29
content/snippets/0300-ssh-keys-from-token-on-macos.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# 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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user