Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Where can I upload a list of my friends and get a list of their keys found on keyservers?

Here are some key servers:

If I had nothing to do all day, I could open my address book each week and paste in each of my friends address and import them.

How can I automatically fetch and update my friend's keys based on a list of their e-mail addresses?

share|improve this question

closed as off-topic by GdD, Adi, Xander, TildalWave, NULLZ Sep 24 '13 at 23:02

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

don't forget that you need to TRUST the key : it means you need to be SURE it's their key, and not one with the same name (or one trying to appear to be someone else) ! So in other words: your friends send you their keys via a reliable way (or tell you via a reliable way where they stored it and what's its signature is), and you then assign trust to their public keys. iow, you need to ensure the keys you find are really their keys! – Olivier Dulac Sep 24 '13 at 15:19
up vote 1 down vote accepted

Just save a very small script. You could even run it using a cron job.

This code will read a file, search for each line on the default keyserver, extract found key IDs and recieve them. Call as myfriendlist.txt if file names used accordingly.

If using as cron job, watch out to run the script in the correct user context (not as root)!

while read line
    gpg --with-colons --batch --search $line 2>/dev/null | \
    awk 'BEGIN { FS = ":" };  $1=="pub" { print $2 }' | \
    xargs gpg --recv-keys
done < $1
share|improve this answer
Looks great, thanks. – Full Decent Sep 26 '13 at 13:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.