Skip to content

Instantly share code, notes, and snippets.

@valeth
Last active November 12, 2017 23:31
Show Gist options
  • Save valeth/0c35df5eb794c18b033011534dbb41c0 to your computer and use it in GitHub Desktop.
Save valeth/0c35df5eb794c18b033011534dbb41c0 to your computer and use it in GitHub Desktop.
GPG as SSH agent

Generate keys

Assuming a keychain already exists.

gpg --expert --edit-key KEYID

addkey and go through process

quit and save

Get public SSH key

gpg --output my_public_key.pub --export-ssh-key SUBKEYID! (including the !)

Make key available

gpg --list-keys --with-keygrip to get the keygrip

Add keygrip to the sshcontrol file under the $GNUPGHOME

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment