

Gpg: key D94AA3F0EFE21092: public key "Ubuntu CD Image Automatic Signing Key (2012) " imported Gpg: key 46181433FBB75451: public key "Ubuntu CD Image Automatic Signing Key " imported Gpg: /root/.gnupg/trustdb.gpg: trustdb created Gpg: requesting key D94AA3F0EFE21092 from hkp server You should see a message like this: gpg: requesting key 46181433FBB75451 from hkp server This command should retrieve the keys we want and add them to your keyring. Note that the ID numbers are hexadecimal, so we prefix them with 0x: gpg -keyid-format long -keyserver hkp:// -recv-keys 0x46181433FBB75451 0xD94AA3F0EFE21092 Knowing these ID numbers (46181433FBB75451 and D94AA3F0EFE21092 in the example), means we can request them from the Ubuntu key server. This is actually a really useful message, as it tells us which key or keys were used to generate the signature file. Gpg: Signature made Thu Apr 5 22:19:36 2018 EDT Gpg: Can't check signature: No public key If there is no public key for Ubuntu already present, you will get an error message similar to the following: gpg: Signature made Thu Apr 5 22:19:36 2018 EDT

We use GnuPG’s “long” (64-bit) key IDs throughout this tutorial, since “short” (32-bit) key IDs are insecure. The easiest way to find out if you need the key is to run the authentication command: gpg -keyid-format long -verify SHA256SUMS.gpg SHA256SUMS Retrieve the correct signature keyĭepending on your platform, you may or may not need to download the public key used to authenticate the checksum file (Ubuntu and most variants come with the relevant keys pre-installed). Now we have the tools we need, we can move on to finding and downloading the files we need md5sum -versionīoth these commands should output some version information. If this is the first time you have run gpg, this will create a trust database for the current user. You can check the commands work as expected by running the following: gpg -list-keys All versions - check the commands are working! If you don’t have them, check with your package manager and search for the executable names given above. Your mileage may vary, but these are standard tools included and enabled by default in most systems.


The sha256sum program and other useful utilities are provided by coreutils: brew install coreutils You can install the latest GnuPG using Homebrew: brew install gnupg If you are using bash on Windows 10 (why on earth not? See this tutorial), these tools are part of the default install. These are part of the coreutils and gnupg packages, which are installed by default. The key executables you will require are sha256sum, md5sum and gpg.
