LX0-104 · Question #686
Which of the following commands gets the GnuPG public key with the id 63B4835B from the keyserver ? example.com
The correct answer is A. gpg - -keyserver hkp://example.com - -recv-key 63B4835B. To retrieve a GnuPG public key from a keyserver, the gpg command is used with the --keyserver option to specify the server and the --recv-key option with the key's ID.
Question
Options
- Agpg - -keyserver hkp://example.com - -recv-key 63B4835B
- Bgpg - -search-key hkp:// [email protected]
- Cgpg - -keyserver gpg://example.com - -get-key 63B4835B
- Dgpg - -keyserver hkp://example.com - -add-key 63B4835B
- Egpg - -keyserver gpg://example.com - -key 63B4835B
How the community answered
(22 responses)- A91% (20)
- D5% (1)
- E5% (1)
Why each option
To retrieve a GnuPG public key from a keyserver, the `gpg` command is used with the `--keyserver` option to specify the server and the `--recv-key` option with the key's ID.
The `gpg` command with `--keyserver hkp://example.com` correctly designates the keyserver using the HTTP Keyserver Protocol. The `--recv-key 63B4835B` option is the specific GnuPG subcommand used to fetch a public key by its identifier and add it to the local keyring.
The `--search-key` option is used to search for keys, not directly receive a specific key, and the syntax `[email protected]` is incorrect for specifying a keyserver and key ID for retrieval.
The `--get-key` option is not a standard GnuPG subcommand for retrieving keys from a keyserver, and `gpg://` is not the standard protocol used for keyservers.
The `--add-key` option is not a standard GnuPG subcommand for retrieving keys from a keyserver; it usually pertains to importing local keys, and the syntax is incorrect for fetching from a server.
The `--key` option is not a standard GnuPG subcommand for retrieving keys from a keyserver, and `gpg://` is not the recognized protocol for keyserver communication.
Concept tested: GnuPG public key retrieval from keyservers
Source: https://manpages.debian.org/testing/gnupg/gpg.1.en.html
Topics
Community Discussion
No community discussion yet for this question.