Created
November 4, 2014 12:25
-
-
Save Avaq/e31ddbd427cffbeab734 to your computer and use it in GitHub Desktop.
Exporting and importing GPG keys over SSH
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
| ssh user@remote gpg --export-secret-key KeyId | gpg --allow-secret-key-import --import |
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
| # Based on key ID. | |
| ssh user@remote gpg --export KeyId | gpg --import | |
| # Based on key owner name. | |
| ssh user@remote gpg --export -a KeyOwnerName | gpg --import |
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
| gpg --export-secret-key KeyId | ssh user@remote gpg --allow-secret-key-import --import |
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
| gpg --export KeyId | ssh user@remote gpg --import |
Author
I have not come across that. I'm sorry.
@Jacob-Stevens-Haas I also have this error. you must add the --batch parameter to the importing gpg. eg gpg --armor --export-secret-keys $KEY_ID | ssh [email protected] gpg --allow-secret-key-import --import --batch gpg (GnuPG) 2.3.7
I ran into several problems, the following should solve them:
error sending to agent: No pinentry: just installpinentrypackage on target machine.error sending to agent: No such file or directory: just like @aidenscott2016 said, need to add--batchparameter with--importtogether.- problem 2 still, run
echo pinentry-mode loopback >> ~/.gnupg/gpg-agent.confand restart gpg agent aftergpgconf --kill gpg-agentshould fix it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! Any idea what
error sending to agent: Inappropriate ioctl for devicemeans when pushing public/private key?