If you are using GnuPG, you may receive new signatures or do other changes to your GPG key and want to upload it to keyservers and/or your webserver to make it easier for other people to find it.

Since this is a tedious task, I wrote a little script "gpg-update-key" which does the job for me:



# upload the key to some key servers
gpg --keyserver --send-key ${KEY}
gpg --keyserver --send-key ${KEY}
gpg --keyserver --send-key ${KEY}
gpg --keyserver --send-key ${KEY}

# export the key
gpg --armor --export ${KEY} > /tmp/pub.asc
gpg --export ${KEY} > /tmp/pub.key

scp /tmp/pub.asc /tmp/pub.key ${REMOTE_DIR}

Note that you should change the KEY and REMOTE_DIR variables otherwise the script won't help you that much :). Also, the list of key servers to upload are just my personal favourites. Adjust them to your needs.