Skip to content

Instantly share code, notes, and snippets.

@todd-a-jacobs
Created March 7, 2015 02:03
Show Gist options
  • Save todd-a-jacobs/46e3eeac134d96dace9f to your computer and use it in GitHub Desktop.
Save todd-a-jacobs/46e3eeac134d96dace9f to your computer and use it in GitHub Desktop.
Extract an OpenSSH public key from an OpenPGP authentication key stored on a Yubikey NEO.
echo 'SSH Public Key for Yubikey NEO'
echo '------------------------------'
gpgkey2ssh $(
gpg --card-status 2>&1 |
pcregrep -o '^Authentication.*\K.{9}$' |
tr -d ' '
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment