Linux will pinentry-gnome, macos will use pinentry-mac as interface client.
-
Generate ssh config with gpg forwarding enabled using the following command. This will append a config to your
~/.ssh/config
.generate-ssh-gpg-config kuro 10.0.0.3 ztlevi
-
You can either add
StreamLocalBindUnlink yes
to your/etc/ssh/sshd_config
and restart your sshd service. Or usessh-with-gpg-socket-deleted kuro 10.0.0.3 ztlevi
to kill remote gpg-agent and then create a ssh session with local gpg forwarded. -
Copy the puclic key to the remote machine
scp -r $HOME/.gnupg kuro:/home/ztlevi # Then on remote server, e.g. kuro, do: gpgconf --kill gpg-agent
Or, if you exported already:
cd ~/Downloads/mygpgexport gpg --import myprivatekeys.asc gpg --import mypubkeys.asc gpg -K gpg -k gpg --import-ownertrust otrust.txt # restart agent gpgconf --kill gpg-agent
cd ~/Downloads
echo "test" | gpg --encrypt -r [email protected]
echo "test" | gpg --encrypt -r [email protected] > output
gpg --decrypt output