1 Moving or copying GPG keys
Matej Focko edited this page 2022-03-13 13:56:23 +01:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Moving or copying GPG keys

  1. Export the keys

    $ gpg --export-secret-keys -a > my_private_key.asc
    $ gpg --export -a > my_public_key.asc
    
  2. Import the keys

    $ gpg --import my_private_key.asc
    $ gpg --import my_public_key.asc
    
  3. Trust the imported key

    $ gpg --edit-key insert mail here
    Command> trust
    # trust ultimately
    

Source: https://www.phildev.net/pgp/gpg_moving_keys.html