diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2025-10-13 23:55:24 -0400 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2025-10-13 23:55:24 -0400 |
| commit | cd7c653db7b857f7bb806148ce867462fcf946da (patch) | |
| tree | 19feb7d6c61c7a59b6fda406f459714d9fdecace | |
| parent | 21cbbd2d61b4020817c31cc61ea665301866e0c8 (diff) | |
| download | dotfiles-cd7c653db7b857f7bb806148ce867462fcf946da.tar.gz dotfiles-cd7c653db7b857f7bb806148ce867462fcf946da.tar.xz | |
Fixes for OpenSSH 10.1
| -rw-r--r-- | kshrc | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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" |
