Use ssh-agent instead og gpg-agent for SSH
This commit is contained in:
parent
865d5fcd2a
commit
0deeea5b74
|
@ -27,6 +27,10 @@ get_ip() {
|
|||
eval "curl ${ARGS[@]} -fsSL 'https://ifconfig.co/json$IP' $JQ"
|
||||
}
|
||||
|
||||
gpg_ssh() {
|
||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||
}
|
||||
|
||||
http() {
|
||||
(( ${+commands[python]} )) || return 2
|
||||
[[ $# -gt 0 ]] && local DIR="--directory=$1" && shift
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
if [[ -z $SSH_CONNECTION ]] && [[ $HOSTNAME != "toolbox" ]]; then
|
||||
export GPG_TTY="$TTY"
|
||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||
gpgconf --launch gpg-agent
|
||||
gpg-connect-agent updatestartuptty /bye &> /dev/null
|
||||
fi
|
||||
|
|
2
zsh/.config/zsh/ssh.zsh
Normal file
2
zsh/.config/zsh/ssh.zsh
Normal file
|
@ -0,0 +1,2 @@
|
|||
[[ -z $SSH_CONNECTION ]] && [[ $HOSTNAME != "toolbox" ]] &&
|
||||
eval "$(ssh-agent)" &> /dev/null
|
Loading…
Reference in a new issue