Forward GnuPG agent from macOS to Linux On the remote machine Run gpg once as your to create the directory structure gpg --list-keys For headless systemd based hosts