Skip to content

Instantly share code, notes, and snippets.

@greyltc
Last active April 15, 2023 10:22
Show Gist options
  • Save greyltc/a27842e69f98d11277f28dc26f83a24a to your computer and use it in GitHub Desktop.
Save greyltc/a27842e69f98d11277f28dc26f83a24a to your computer and use it in GitHub Desktop.
ssh/pgp key management notes

install keybase packages

keybase kbfs

login

keybase login greyltc

import pgp key from keybase

systemctl --user start kbfs
# use `mount` to figure out where kbfs is mounted, assume that's {XDG_RUNTIME_DIR} here
ln -s "${XDG_RUNTIME_DIR}/keybase/kbfs" ~/.
gpg --import ~/kbfs/private/greyltc/.keys/pgp/*

do this command to display public key in case it needs to be pasted somewhere:

gpg --export-ssh-key "Grey Christoforo <[email protected]>"

find my authentication [a] key's keygrip

gpg --list-keys --with-keygrip
# then put that value into a file: `~/.gnupg/sshcontrol`

into ~/.bashrc:

unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
  export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi

export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null

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