aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2025-10-13 23:55:24 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2025-10-13 23:55:24 -0400
commitcd7c653db7b857f7bb806148ce867462fcf946da (patch)
tree19feb7d6c61c7a59b6fda406f459714d9fdecace
parent21cbbd2d61b4020817c31cc61ea665301866e0c8 (diff)
downloaddotfiles-cd7c653db7b857f7bb806148ce867462fcf946da.tar.gz
dotfiles-cd7c653db7b857f7bb806148ce867462fcf946da.tar.xz
Fixes for OpenSSH 10.1
-rw-r--r--kshrc13
1 files changed, 10 insertions, 3 deletions
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"