Setup GPG Key Server on Debian

From banana_wiki
Revision as of 15:09, 10 April 2014 by Bananafish (talk | contribs) (Created page with "This will setup a public Key server on Debian for sharing public gpg keys. First we need to install the sks package: <pre>sudo apt-get install sks</pre> Next build the sks d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This will setup a public Key server on Debian for sharing public gpg keys.

First we need to install the sks package:

sudo apt-get install sks

Next build the sks database

sudo sks build

Give the database appropriate permissions

sudo chown -Rc debian-sks:debian-sks /var/lib/sks/DB

Edit /etc/default/sks to have it start at boot

initstart=yes

Now start sks

sudo /etc/init.d/sks start

Now your server is listening on port 11371 for key requests. You can now send and retrieve keys to and from the server using your favorite key manager!

If that is not good enough for you, then you can also add a web interface to handle your key searches and requests. To do that you will need to install Apache:

sudo apt-get install apache2

Once installed create a directory called www in /var/lib/sks/. Download the index.html and keys.jpg file you will need here

Extract the contents to /var/lib/sks/www/. Edit index.html and change the three references to your.site.name (currently at lines 20, 36 & 62) to the url of your keyserver, for example keys.bauer-power.net. Now set the correct permissions on that directory:

sudo chown -R debian-sks:debian-sks /var/lib/sks/www

Now if you browse to http://your.server.name:11371 you will see a nice, user-friendly web interface for doing public key exchanges!