Forward GNUPG agent with the following steps: On the remote insecure machine: Run gpg once to create the directory structure. gpg --list-keys On the local machine: