personal blog
git clone git://
Log | Files | Refs | README

commit fd9535de7a9c29c058207dc2b48e3213e219e8fd
parent c51306f82d39319d2ece5f4e78efe7b25272d896
Author: pyratebeard <>
Date:   Thu,  1 Dec 2022 14:00:59 +0000


Mentry/ | 20++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/entry/ b/entry/ @@ -24,12 +24,20 @@ As it turns out you can add an SSH key as a subkey to a GPG key, then `gpg-agent To add your SSH key as a subkey edit your GPG key in expert mode ``` -gpg2 -a --export-secret-keys <key_id> > gpg_key.asc -mkdir tmp_gpg -chmod 700 tmp_gpg -gpg2 --homedir tmp_gpg --import gpg_key.asc -gpg2 --homedir tmp_gpg --quick-add-key <key_id> ed25519 auth 0 -gpg2 --homedir tmp_gpg --export-ssh-key <key_id> +gpg2 -a --export-secret-keys <key_id> > original_backup.asc +gpg2 --quick-add-key <key_id> ed25519 auth 0 +gpg2 --export-ssh-key <key_id> +keychain --agents ssh,gpg -k +gpg2 -K --with-keygrip +# get keygrip of ssh key +echo <keygrip> >> ~/.gnupg/sshcontrol +vi ~/.zsh/keychain.zsh + eval $(keychain -q --agents gpg --nogui --eval 0xC7877C715113A16D) + gpg-connect-agent updatestartuptty /bye >/dev/null + if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ] ; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + fi +gpg2 -a --export-secret-keys <key_id> > gpg_with_ssh.asc ```