From cd7c653db7b857f7bb806148ce867462fcf946da Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Mon, 13 Oct 2025 23:55:24 -0400 Subject: Fixes for OpenSSH 10.1 --- kshrc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'kshrc') diff --git a/kshrc b/kshrc index 429664a..d6a5207 100644 --- a/kshrc +++ b/kshrc @@ -325,9 +325,9 @@ checkSSHAgentForward() { && [ -z "$TMUX" ] ; then echo "SSH_AUTH_SOCK=\"$SSH_AUTH_SOCK\"; export SSH_AUTH_SOCK" \ - > "$HOME"/.ssh/agent + > "$HOME"/.ssh/agent_conf elif [ -n "$TMUX" ]; then - . "$HOME"/.ssh/agent + . "$HOME"/.ssh/agent_conf fi } @@ -337,7 +337,14 @@ checkSSHAgent() { pkill -9 ssh-agent fi - ssh_agent_conf="$HOME/.ssh/agent" + # So OpenSSH 10.1 steps on my configuration, rather than passing in + # -T which doesn't exist on older SSH, simply move my configuration + # out of the way. + if [ -f "$HOME/.ssh/agent" ] ; then + rm "$HOME/.ssh/agent" + fi + + ssh_agent_conf="$HOME/.ssh/agent_conf" if [ -e "$ssh_agent_conf" ] ; then #shellcheck disable=SC1090 . "$ssh_agent_conf" -- cgit v1.2.3