Find the answer to your Linux question:
Results 1 to 3 of 3
Hi folks! I've been reading lately about GnuPG and how I can use it to sign and encrypt data. I know the importance of my passphrase, and that I should ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Posts
    2

    GnuPG: I want my private key!


    Hi folks!

    I've been reading lately about GnuPG and how I can use it to sign and encrypt data. I know the importance of my passphrase, and that I should not forget it. Ever. That's okay. But what does happen if my box crashes? Can I get my private key back? I've read a lot about exporting my public key and publishing it somewhere. It wouldn't be a pain to get it back after all. Everyone *should* have a copy.

    So, is there a way I can "store away" my private key in a way I could later use it if necesary? Is there some sort of --export-private-key I might have missed? Or should I just take all my files in ~/.gnupg and store them appart?

    Thanks everyone for wasting your time with my newbie problems

  2. #2
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    712
    Code:
    man gpg
    The man page turns up --export-secret-keys

    Code:
    gpg --export-secret-keys > secret.keys
    Will export your secret keys to a file. This can be backed up and re-imported later.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  3. #3
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Quote Originally Posted by chrishoeppner View Post
    So, is there a way I can "store away" my private key in a way I could later use it if necesary? Is there some sort of --export-private-key I might have missed? Or should I just take all my files in ~/.gnupg and store them appart?
    You can do either (export the private key or back up ~/.gnupg).

    I keep a backup of my private keys, public keys, and ownertrust db on a usb drive in a secure area.

    Be really careful that you keep your private key in a safe place. Do not publish it or put it somewhere where others will have access to it.

    As mentioned, manpages for gpg(1) and the following URL are your friends.

    Documentation Sources - GnuPG.org

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •