Update all code blocks
This commit is contained in:
parent
5bd12c70c7
commit
1d67e73eff
14 changed files with 237 additions and 246 deletions
|
@ -1,35 +1,35 @@
|
|||
# HowtoGPG
|
||||
|
||||
## Some commands:
|
||||
```
|
||||
gpg --card-status
|
||||
gpg --export-ssh-key keyID
|
||||
gpg --armor --export keyID > pubkey.asc
|
||||
```console
|
||||
$ 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
|
||||
```console
|
||||
$ gpg --import pubkey.asc
|
||||
$ gpg --card-status
|
||||
```
|
||||
|
||||
## Use GPG Agent as SSH Agent
|
||||
|
||||
```
|
||||
vim .gnupg/gpg-agent.conf
|
||||
```console
|
||||
$ vim .gnupg/gpg-agent.conf
|
||||
enable-ssh-support
|
||||
pinentry-program /usr/bin/pinentry-qt
|
||||
|
||||
systemctl --user enable --now /usr/lib/systemd/user/gpg-agent*
|
||||
$ systemctl --user enable --now /usr/lib/systemd/user/gpg-agent*
|
||||
|
||||
vim .bashrc
|
||||
$ vim .bashrc
|
||||
export SSH_AUTH_SOCK="/run/user/$(id -u)/gnupg/S.gpg-agent.ssh"
|
||||
```
|
||||
|
||||
## Export your public key to your web server:
|
||||
|
||||
```
|
||||
```console
|
||||
$ mkdir openpgpkey
|
||||
$ gpg --list-options show-only-fpr-mbox -k keyID | /usr/lib/gnupg/gpg-wks-client -v --install-key
|
||||
```
|
||||
|
@ -43,22 +43,22 @@ My public key is available via: <https://openpgpkey.benpro.fr/.well-known/openpg
|
|||
|
||||
WKD mean Web Key Directory. Interesting website: <https://metacode.biz/openpgp/web-key-directory>
|
||||
|
||||
```
|
||||
gpg --locate-key user@example.com
|
||||
```console
|
||||
$ 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
|
||||
```console
|
||||
$ 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
|
||||
```console
|
||||
$ gpg --keyserver pool.sks-keyservers.net --recv-keys keyID
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue