Created
March 20, 2011 22:18
-
-
Save drocamor/878731 to your computer and use it in GitHub Desktop.
Exporting the public part of your PGP authentication subkey
This file contains 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
# I took this from here: http://www.programmierecke.net/howto/gpg-ssh.html | |
# Deactivate the gnome-keyring. We will be replacing it with gnupg-agent | |
gconftool-2 --type bool --set /apps/gnome-keyring/daemon-components/ssh false | |
# Configure gpg to use the agent | |
echo "use-agent" >> ~/.gnupg/gpg.conf | |
# Enable ssh-agent drop in replacement support for gpg-agent | |
echo "enable-ssh-support" >> ~/.gnupg/gpg-agent.conf |
This file contains 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
# Find the fingerprint of your authentication subkey. | |
gpg --list-keys '[email protected]' | |
# You should see something like: | |
# pub 4096R/01A35709 2010-01-30 [expires: 2011-06-12] | |
# uid J. Alfred Prufrock <[email protected]> | |
# sub 2048R/B283E368 2010-01-30 | |
# That sub is the authentication subkey. Convert it to the SSH format like so: | |
gpgkey2ssh B283E368 >> ~/my-public-key | |
# Now use my-public-key as your authorized_keys file on remote servers | |
# gpgkey2ssh is from the gnupg-agent package yet it has no manpage, no usage, no --help, and is basically undocumented. Awesome, right? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Newer versions of gpg have the
--export-ssh-key
option.See this post on the mailing list: https://lists.gnupg.org/pipermail/gnupg-devel/2016-January/030682.html