LFCS · Question #400
Which GPG command is used to sign a public key? (Select TWO correct answers)
The correct answer is B. gpg signkey UID D. gpg editkey UID followed with the sign command. To sign a public key using GPG, you can either directly use the gpg --sign-key UID command or enter the key editing menu with gpg --edit-key UID and then use the sign command within that interface.
Question
Options
- Agpg signpublickey UID
- Bgpg signkey UID
- Cgpg sign UID
- Dgpg editkey UID followed with the sign command.
- Egpg editkey UID followed with the confirm command.
How the community answered
(34 responses)- B91% (31)
- C6% (2)
- E3% (1)
Why each option
To sign a public key using GPG, you can either directly use the `gpg --sign-key UID` command or enter the key editing menu with `gpg --edit-key UID` and then use the `sign` command within that interface.
`gpg signpublickey` is not a standard GPG command for signing public keys.
The `gpg --sign-key UID` command directly instructs GPG to sign the public key associated with the specified User ID (UID), often prompting for confirmation.
`gpg sign UID` is typically used to sign a *file* with your private key, not to sign another public key itself.
The `gpg --edit-key UID` command enters an interactive key management menu where the `sign` command can be used to sign the currently selected public key.
The `confirm` command in `gpg --edit-key` is used to confirm changes before saving, not to sign a key.
Concept tested: GPG key signing
Source: https://www.gnupg.org/gph/en/manual/x110.html
Topics
Community Discussion
No community discussion yet for this question.