From 97732a48304791bd83aa521972497488eacd3569 Mon Sep 17 00:00:00 2001 From: Jason Swank Date: Fri, 17 Nov 2023 20:01:01 +0000 Subject: [PATCH] ssh: fix agent forwarding w/ tmux --- tmux/.config/tmux/tmux.conf | 5 ++--- zsh/.zshrc | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index 6a151d7..7dbd75a 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -12,10 +12,9 @@ bind Escape copy-mode #bind-key -t vi-copy 'v' begin-selection #bind-key -t vi-copy 'y' copy-selection -# remove SSH_AUTH_SOCK from update-environment, otherwise setting -# it specifically doesn't work - +# remove SSH_AUTH_SOCK from update-environment, otherwise setting it specifically doesn't work set-option -g update-environment "DISPLAY LANG LC_ALL SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY" + set-environment -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock set -g escape-time 10 diff --git a/zsh/.zshrc b/zsh/.zshrc index 40a80c5..fdc1e78 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -24,11 +24,6 @@ if [ -e /usr/bin/keychain ]; then eval $(/usr/bin/keychain --eval --agents ssh -Q --quiet id_ed25519) fi -if [ -n "$SSH_AUTH_SOCK" ]; then - ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock - export SSH_AUTH_SOCK=$HOME/.ssh/ssh_auth_sock -fi - # direnv setup whence -p direnv &>/dev/null && eval "$(direnv hook zsh)"