#StackBounty: #server #20.04 #gnupg #keyserver Proper way to set up or change a preferred gpg keyserver in ubuntu 20.04?

Bounty: 50

I am using ubuntu server 20.04. I am attempting to download developer public gpg/pgp keys from keyservers. For many of the keys that I want, they don’t seem to be listed on ubuntu’s default key servers. The ones that are listed, don’t seem to be accurate or otherwise seem outdated or expired. What I want to do is, when trying to download a public key on ubuntu, make ubuntu default towards looking up the requested key from the most stringent (email requirement wise) keyserver (https://keys.openpgp.org/) first, and then, if not found, to automatically look up the key from a more lax and more compatable keyserver (hkp://pool.sks-keyservers.net).

The first issue I have, is that I can’t find any settings in the terminal where ubuntu stores its default permanent key-server addresses when doing key lookups/downloads. So, my questions are:

  1. Where is the default ubuntu keyserver setting located (what file can I modify to change the default keyserver permanently in ubuntu?)?
  2. How Can I set 2 keyservers (in ubuntu) with their order being their preference in which ubuntu places requests to them? Such that keyserver1=https://keys.openpgp.org/ and keyserver2=hkp://pool.sks-keyservers.net, so that if a key cannot be found on keyserver1, then ubuntu searches for the key on keyserver2?

Thanks for any help!

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.