51 lines
1 KiB
Text
51 lines
1 KiB
Text
# HowtoGPG
|
|
|
|
## Some commands:
|
|
```
|
|
gpg --card-status
|
|
gpg --export-ssh-key keyID
|
|
gpg --armor --export keyID > pubkey.asc
|
|
```
|
|
|
|
## Use Nitrokey from new system:
|
|
|
|
```
|
|
gpg --import pubkey.asc
|
|
gpg --card-status
|
|
```
|
|
|
|
## Export your public key to your web server:
|
|
|
|
```
|
|
$ mkdir openpgpkey
|
|
$ gpg --list-options show-only-fpr-mbox -k keyID | /usr/lib/gnupg/gpg-wks-client -v --install-key
|
|
```
|
|
|
|
Then publish to your web server. https://openpgpkey.example.com/.well-known/openpgpkey/example.com/hu/
|
|
My public key is available via: <https://openpgpkey.benpro.fr/.well-known/openpgpkey/benpro.fr/hu/7ue9nu5hdtshxjynnn6haqyohye8716e>
|
|
|
|
## Get public keys
|
|
|
|
### From WKD
|
|
|
|
WKD mean Web Key Directory. Interesting website: <https://metacode.biz/openpgp/web-key-directory>
|
|
|
|
```
|
|
gpg --locate-key user@example.com
|
|
```
|
|
|
|
### From keyserver
|
|
|
|
#### With keys.openpgp.org
|
|
|
|
```
|
|
echo keyserver hkps://keys.openpgp.org >> ~/.gnupg/gpg.conf
|
|
gpg --auto-key-locate keyserver --locate-keys user@example.com
|
|
```
|
|
|
|
#### With sks-keyservers.net
|
|
|
|
```
|
|
gpg --keyserver pool.sks-keyservers.net --recv-keys keyID
|
|
```
|
|
|