pyratelog

personal blog
git clone git://git.pyratebeard.net/pyratelog.git
Log | Files | Refs | README

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

where_the_sshadows_lie

Diffstat:
Mentry/where_the_sshadows_lie.md | 20++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/entry/where_the_sshadows_lie.md b/entry/where_the_sshadows_lie.md @@ -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 ``` https://opensource.com/article/19/4/gpg-subkeys-ssh-multiples https://gist.github.com/grenade/6318301?permalink_comment_id=3527964