Moving to another computer

Henry Hertz Hobbit hhhobbit7 at
Fri Jun 23 08:05:42 CEST 2006

>Robert J. Hansen wrote:
>>> Matthew West wrote:
>>>> Hi, I have all of my gnupg information set up on this current machine.
>>>> How would I transfer my information to another computer. Is it fine to
>>>> use the same information on both computers?
>>> Copy ~/.gnupg/* to your other computer; specifically, trustdb.gpg,
>>> secring.gpg, pubring.gpg, gpg.conf.
>> Please don't follow this advice.
>> Copying your entire .gnupg/ directory will also copy random_seed.  You
>> don't want random_seed to be shared between two computers.  That could
>> potentially result in a session key not being a one-time thing.  If two
>> computers share a random seed file, the chances of their random
>> sequences being not-at-all-random increases.
>> By all means, copy *.gpg and gpg.conf.  Leave random_seed alone.  You'll
>> be happier that way.
>Yeah, I should have thought of that... that's what comes of posting just
>before lunch.

Hmm, that is better than after lunch since I am digesting it.  The best
time is 11:48 PM (now) when my mind is racing along.  Depending on if
you have bzip2 in your tar command:

Option 1 (you have bzip2 integrated in tar command):
$ cd
$ tar -cjvf gnupg.tbz --exclude random_seed ./.gnupg
# copy gnupg.tbz to you new home folder on the new machine and type:
$ tar -xjvf gnupg.tbz

Option 2 (you have gzip, but it is NOT integrated into tar):
$ cd
$ tar -cvf gnupg.tar --exclude random_seed ./.gnupg
$ gzip -9 gnupg.tar
# copy gnupg.tar.gz file to your home folder ...
$ gzip -dc gnupg.tar.gz | tar -xvf -

Option 3 (no compression - OUCH!):
$ cd
$ tar -cvf gnupg.tar -exclude random_seed ./.gnupg
# copy gnupg.tar file to your home folder ...
tar -xvf gnupg.tar

Of course, you COULD use zip but on 'nix machines I think you are
going to find gzip or bzip2 long before you have zip and unzip on
your machine.  It will create your random_seed file the first time
you run it.  Just make sure your umask is 077.

Your key is your key is your key.  It belongs to YOU, not a machine.
I have mine in five places but I do NOT just leave the secring.gpg
file around.  When working on a shared machine I copy it into place
when I need to use it and delete when I log off (still carrying my
copy of secring.gpg with me on removable storage).


Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at

More information about the Gnupg-users mailing list