Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

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, Adnan, 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.

1  
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

1 Answer 1

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 search-friends-keys.sh 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)!

#!/bin/sh
while read line
do
    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.