diff --git a/modules/gpg/init.zsh b/modules/gpg/init.zsh index a7c6cf7..2020f22 100644 --- a/modules/gpg/init.zsh +++ b/modules/gpg/init.zsh @@ -41,12 +41,16 @@ if grep 'enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null } add-zsh-hook preexec _gpg-agent-update-tty + _gpg-agent-update-tty fi # Clean up. unset _gpg_agent_{conf,env} # Disable GUI prompts inside SSH. -if [[ -n "$SSH_CONNECTION" ]]; then - export PINENTRY_USER_DATA='USE_CURSES=1' -fi +#if [[ -n "$SSH_CONNECTION" ]]; then +# export PINENTRY_USER_DATA='USE_CURSES=1' +#fi + +# Disable GUI prompts +export PINENTRY_USER_DATA='USE_CURSES=1' diff --git a/modules/ssh/init.zsh b/modules/ssh/init.zsh index f632328..5429b05 100644 --- a/modules/ssh/init.zsh +++ b/modules/ssh/init.zsh @@ -19,15 +19,17 @@ _ssh_agent_env="${_ssh_agent_env:-${TMPDIR:-/tmp}/ssh-agent.env}" # Set the path to the persistent authentication socket. _ssh_agent_sock="${TMPDIR:-/tmp}/ssh-agent.sock" +source "$_ssh_agent_env" 2> /dev/null + # Start ssh-agent if not started. if [[ ! -S "$SSH_AUTH_SOCK" ]]; then # Export environment variables. source "$_ssh_agent_env" 2> /dev/null - # Start ssh-agent if not started. - if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then - eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")" - fi + # # Start ssh-agent if not started. + # if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then + # eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")" + # fi fi # Create a persistent SSH authentication socket.