-
-
Save asconix/2802ce4ecd2c14953e59b327bc7ea9cb to your computer and use it in GitHub Desktop.
Moving GPG keys to new machine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mac and Linux work the same, storing the keys in ~/.gnupg. The safest way to transfer the files is using scp (part of ssh): | |
To copy from your local machine to another: | |
scp -rp ~/.gnupg othermachine: | |
To copy from a remote machine to your local: | |
scp -r othermachine:~/.gnupg ~ | |
If you're on the machine that already has the key: | |
gpg --export-secret-key SOMEKEYID | ssh othermachine gpg --import | |
If you're on the machine that needs the key: | |
ssh othermachine gpg --export-secret-key SOMEKEYID | gpg --import |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment