SSH login via GPG authentication subkey
parent
f302bd746a
commit
25c08c9a30
|
@ -1,3 +1,4 @@
|
|||
enable-ssh-support
|
||||
default-cache-ttl 3600
|
||||
max-cache-ttl 7200
|
||||
pinentry-program /usr/bin/pinentry-curses
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
8870E499C64EEB7720EBA5A442F4FE90129BFAE3
|
||||
8870E499C64EEB7720EBA5A442F4FE90129BFAE3
|
||||
|
||||
|
|
12
.zshrc
12
.zshrc
|
@ -79,8 +79,16 @@ alias lt='ls -lath'
|
|||
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||
config config --local status.showUntrackedFiles no
|
||||
|
||||
# GPG with SSH auth capabilities
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
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
|
||||
|
||||
export KEYGRIP=8870E499C64EEB7720EBA5A442F4FE90129BFAE3
|
||||
# Sometimes gpg has a bug and needs to re-import key
|
||||
alias gbye='gpg-connect-agent "delete_key $KEYGRIP" /bye'
|
||||
|
||||
if [ -f ~/.aliases ]; then
|
||||
. ~/.aliases
|
||||
|
|
Loading…
Reference in New Issue