How to export your public key to an ASCII / text file in GnuPG

Once you have generated your key pair, you need to make sure you back it up safely, to prevent the loss of the keys if the computer crashes or is re-installed.

The reasons the public key is exported to a text file:
1. To make sure the key is stored off the computer somewhere safely.
2. To allow the key to be exported to a key server.

Open a terminal window on your Ubuntu system and enter the following command.
$ gpg --export --armor john.doe@emaildomain.com --output johndoepub.asc <enter>

The public key will be exported to a file johndoepub.asc.

You can also upload this key to any PGP key server. You can also open the johndoepub.asc file, copy and paste the contents into a key server that displays a text box for your type in the key.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s