This is about how I setup and use GnuPG for signing and encrypting data as well as for authenticating SSH sessions. I use both, a YubiKey (4 and 5 NFC) and a GnuPG smartcard from ZeitControl to have a backup in my wallet. As a smartcard reader I use the uTrust 2700 R which works quite well.
My typical use cases are SSH authentication, secure file exchange via public places and signing Git commits. I rarely use GnuPG for email communication. And I neither sign other GnuPG user IDs nor participate in the WOT.
Since there is no difference between setting up a YubiKey or a smartcard the following description mentions the GnuPG smartcard only.
**The following steps should be done on an