sks(8)
π NAME π
okay so this is the manual for sks(8) β the SKS OpenPGP Key server, aka the Synchronizing Key Server bestie ποΈβ¨
πΈ SYNOPSIS πΈ
sks [options] -debug
β¨ DESCRIPTION β¨
SKS is an OpenPGP keyserver and its whole goal is to be easy to deploy, decentralized, and highly reliable at syncing. That means a key you submit to one SKS server gets distributed to all the key servers like, fast, and even the servers that are wildly out-of-date or have the spottiest connectivity ever can still fully synchronize with the rest of the system. no one gets left behind, periodt π
The design of SKS is deliberately simple. The server is made of two single-threaded processes:
sks dbβ does the normal public-key-server jobs, like answering web requests. Its one special little talent is that it keeps a log summarizing the changes to the key database.sks reconβ does all the work of reconciling host databases. It keeps track of specialized summary information about the database, and it uses that info to efficiently figure out the differences between its own database and another host's. iykyk π§ β¨
π¦ FEATURES π¦
- Highly efficient and reliable reconciliation algorithm π
- Follows
RFC2440andRFC2440biscarefully β and unlike PKS, SKS supports new and old style packets, photoID packets, multiple subkeys, and pretty much everything the RFCs allow. she read the docs fr fr π - Fully compatible with the PKS system β can both send and receive syncs from PKS servers, so connectivity is seamless π«Ά
- Simple configuration: each host just needs a (partial) list of the other participating key servers. Gossip is used to distribute information without putting a heavy load on any one host π
- Supports HKP/web-based querying, and soon-to-be-standard machine readable indices β
π OPTIONS π
The SKS binary command options are as follows:
dbβ initiates database server.reconβ initiates reconciliation server.cleandbβ apply filters to all keys in database, fixing some common problems.buildβ build key database, including body of keys directly in database.fastbuild -n [size] -cache [mbytes]β build key database, doesn't include keys directly in database, and it's faster thanbuild.-nspecifies the number of keydump files to read per pass when used withbuild, and the multiple of 15,000 keys to be read per pass when used withfastbuild.-cachespecifies the database cache to use in megabytes.pbuild -cache [mbytes] -ptree_cache [mbytes]β build prefix-tree database, used by reconciliation server, from key database. Lets you specify the cache for the key database and for the ptree database.dump numkeys dumpdir <filename-prefix>β create a raw dump of the keys in the database. The dump is split into multiple files; the numkeys parameter determines the number of keys dumped in each file. The optional filename-prefix is prepended to the dump file names. Without it the dump files are named0000.pgp,0001.pgp,...mergeβ adds key from key files to existing database.dropβ drops key from database.update_subkeys [-n # of updates / 1000]β updates subkey keyid index to include all current keys. Only useful when upgrading versions1.0.4or before of SKS.versionβ prints SKS version and linked version of Berkeley DB to stdout.helpβ prints the help message.
π ADDITIONAL OPTIONS π
ngl you won't need most of the options below for normal operation. These options can be given in basedir/sksconf or as a command line option for the sks binary.
-debugβ debugging mode.-debuglevelβ debugging level β sets verbosity of logging.-qβ number of bits defining a bin.-mbarβ number of errors that can be corrected in one shot.-seedβ seed used by RNG.-hostnameβ current hostname.-nodenameβ current nodename.-dβ number of keys to drop at random when synchronizing.-nβ number of keydump files to load at once.-max_internal_matchesβ maximum number of matches for most specific word in a multi-word search.-max_matchesβ maximum number of matches that will be returned from a query.-max_uid_fetchesβ maximum number of uid fetches performed in a verbose index query.-pagesizeβ pagesize in 512 byte chucks for key db.-keyid_pagesizeβ pagesize in 512 byte chucks for keyid db.-meta_pagesizeβ pagesize in 512 byte chucks for metadata db.-subkeyid_pagesizeβ pagesize in 512 byte chucks for subkeyid db.-time_pagesizeβ pagesize in 512 byte chucks for time db.-tqueue_pagesizeβ pagesize in 512 byte chucks for tqueue db.-word_pagesizeβ pagesize in 512 byte chunks for word db.-cacheβ cache size in megs for key db.-ptree_pagesizeβ pagesize in 512 byte chunks for prefix tree db.-ptree_cacheβ cache size in megs for prefix tree db.-baseportβ set base port number.-recon_portβ set recon port number.-recon_addressβ set recon binding addresses. Can be a list of whitespace separated IP addresses or domain names.-hkp_portβ set hkp port number.-hkp_addressβ set hkp binding addresses. Can be a list of whitespace separated IP addresses or domain names.-use_port_80β have the HKP interface listen on port 80, as well as thehkp_port.-basedirβ set base directory.-stdoutlogβ send log messages to stdout instead of log file.-diskptreeβ use a disk-based ptree implementation. Slower, but requires far less memory.-nodiskptreeβ use in-mem ptree.-max_ptree_nodesβ maximum number of allowed ptree nodes. Only meaningful if-diskptreeis set.-probβ set probability. Used for testing code only.-recon_sync_intervalβ set sync interval for reconserver.-gossip_intervalβ set time between gossips in minutes.-dontgossipβ don't gossip automatically. Host will still respond to requests from other hosts.-db_sync_intervalβ set sync interval for dbserver.-checkpoint_intervalβ time period between checkpoints.-recon_checkpoint_intervalβ time period between checkpoints for reconserver.-ptree_thresh_multβ multiple of thresh which specifies minimum node size in prefix tree.-recon_thresh_multβ multiple of thresh which specifies minimum node size that is included in reconciliation.-max_recoverβ maximum number of differences to recover in one round.-http_fetch_sizeβ number of keys for reconserver to fetch from dbserver in one go.-wserver_timeoutβ timeout in seconds for webserver requests.-reconciliation_timeoutβ timeout for reconciliation runs in minutes.-stat_hourβ hour at which to run database statistics.-initial_statβ runs database statistics calculation on boot.-reconciliation_config_timeoutβ set timeout in seconds for initial exchange of config info in reconciliation.-missing_keys_timeoutβ timeout in seconds for get_missing_keys.-command_timeoutβ timeout in seconds for commands set over command socket.-sendmail_cmdβ command used for sending mail.-from_addrβ from address used in synchronization emails used to communicate with PKS.-dump_new_onlyβ when doing a database dump, only dump new keys, not keys already contained in a keydump file.-max_outstanding_recon_requestsβ maximum number of outstanding requests in reconciliation.-membership_reload_intervalβ maximum interval (in hours) at which membership file is reloaded.-disable_mailsyncβ disable sending of PKS mailsync messages. ONLY FOR STANDALONE SERVERS! THIS IS THE MECHANIASM FOR SENDING UPDATES TO NON-SKS SERVERS.-disable_log_diffsβ disable logging of recent hashset diffs.-server_contactβ set OpenPGP KeyID of the server contact.
and then the last two get squished together in the original page, so here's the raw tea exactly as it appears:
--help,-help-stdinβ Read keyids from stdin (sksclientonly)
Displays list of options.
π§ FILES π§
info about the important files living in your SKS basedir:
bin/sksβ the main SKS executable.bin/sks_add_mailβ the executable responsible for parsing incoming mails from PKS key servers.bin/sks_build.shβ script to generate an initial database.mailsyncβ the mailsync should contains a list of email addresses of PKS keyservers. This file is important, because it ensures that keys submitted directly to an SKS keyserver are also forwarded to PKS keyservers. IMPORTANT : don't add someone to yourmailsyncfile without getting their permission first! π (fr fr, ask first)membershipβ with SKS, two hosts can efficiently compare their databases then repair whatever differences are found. In order to set up reconciliation, you first need to find other SKS servers that will agree to gossip with you. The hostname and port of the server that has agreed to do so should be added to this file.sksconfβ the configuration file for your SKS server.
π EXAMPLES π
membership
keyserver.ahost.org 11370 # Comments are allowed
keyserver.foo.org 11370 # Another host with default ports
sksconf
membership_reload_interval: 1
initial_stat:
hostname: keyserver.example.com
from_addr: pgp-public-keys@keyserver.example.com
Procmail
PATH=/path/of/sks/exectuables
:0
* ^Subject: incremental
| /path/of/sks_add_mail /path/to/sks/directory
/etc/aliases
pgp-public-keys: "|/path/of/sks_add_mail /path/to/sks/directory"
π SEE ALSO π
The SKS website is located at https://github.com/SKS-Keyserver/sks-keyserver.
π AUTHOR π
The first draft was written by Thomas Sjogren <thomas@northernsecurity.net>.
and that's the whole page bestie π«Ά this manual is version 0.1 and it's dated 2024-07-07, so go forth, sync those keys, and stay iconic πβ¨π
π¦ where this page comes from
- ubuntu questing: sks 1.1.6+git20210302.c3ba6d5a-4.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms