gpg --symmetric meu_texto.txtgpg --output meu_texto.txt --decrypt meu_texto.txt.gpggpg --full-generate-keygpg -r [email protected] -e file_i_want_to_encryptgpg -d file.gpggpg --list-keysgpg --delete-secret-keys "keyname" (delete secret key)
gpg --delete-key "keyname" (delete public key)gpg-agentgpg --export -a [email protected] > contato@your_gpg.pub- First way
gpg --export-secret-keys --armor key_name > /path/to/secret-key-backup.asc- Second way
gpg -o private.gpg --export-options backup --export-secret-keys [email protected]- OBS: This invocation places the key in the file private.gpg in the current directory. The export option backup exports all necessary data for GnuPG to restore the key.
- Import the private key.
gpg --import-options restore --import private.gpgThis invocation imports the key from the file private.gpg in the current directory. The import option restore imports all necessary data for GnuPG to fully restore the key. The import option keep-ownertrust keeps the owner trust of the key instead of clearing it’s trust value. This saves having to manually set the trust value for the key later.
- Enter the private key’s passphrase in the [Import Passphrase Prompt] to import the key
- Now, edit the freshly imported key.
gpg --edit-key [email protected]
gpg> trust
Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y
gpg> quit