diff --git a/README.md b/README.md index 8987f90..5cc6585 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,8 @@ If you have a comment or suggestion, please open an [Issue](https://github.com/d - [Prerequisites](#prerequisites) - [WSL configuration](#wsl-configuration) - [Remote host configuration](#remote-host-configuration) + * [macOS](#macos-1) + - setup LaunchAgent - [Remote Machines (GPG Agent Forwarding)](#remote-machines-gpg-agent-forwarding) * [Steps for older distributions](#steps-for-older-distributions) * [Chained GPG Agent Forwarding](#chained-gpg-agent-forwarding) @@ -2294,6 +2296,64 @@ On the remote host, type `ssh-add -l` - if you see the ssh key, that means forwa **Note** Agent forwarding may be chained through multiple hosts - just follow the same [protocol](#remote-host-configuration) to configure each host. You may also read this part on [chained ssh agent forwarding](#chained-ssh-agent-forwarding). +## macOS + +To use gui applications on macOS, [a little bit more setup is needed](https://jms1.net/yubikey/make-ssh-use-gpg-agent.md). + +Create `$HOME/Library/LaunchAgents/gnupg.gpg-agent.plist` with the following contents: + +``` + + + + + Label + gnupg.gpg-agent + RunAtLoad + + KeepAlive + + ProgramArguments + + /usr/local/MacGPG2/bin/gpg-connect-agent + /bye + + + +``` + +```console +launchctl load gnupg.gpg-agent.plist +``` + +Create `$HOME/Library/LaunchAgents/gnupg.gpg-agent-symlink.plist` with the following contens: + +``` + + + + + Label + gnupg.gpg-agent-symlink + ProgramArguments + + /bin/sh + -c + /bin/ln -sf $HOME/.gnupg/S.gpg-agent.ssh $SSH_AUTH_SOCK + + RunAtLoad + + + +``` + +```console +launchctl load gnupg.gpg-agent-symlink.plist +``` + +You will need to either reboot, or log out and log back in, in order to activate these changes. + # Remote Machines (GPG Agent Forwarding) This section is different from ssh-agent forwarding in [SSH](#ssh) as gpg-agent forwarding has a broader usage, not only limited to ssh.