1
0

tmux.ssh-agent.conf 435 B

1234567
  1. # clear SSH agent shortly after detaching, unless reattached in the meantime
  2. set-hook -g client-detached 'run-shell "~/config/scripts/tmux-clear-ssh-agent.sh 180 &"'
  3. set-hook -g session-closed 'run-shell "~/config/scripts/tmux-clear-ssh-agent.sh 60 &"'
  4. set-hook -g client-attached 'run-shell "pkill -f tmux-clear-ssh-agent.sh || true"'
  5. # ensure the SSH_AUTH_SOCK is updated when re-attaching
  6. set -g update-environment "SSH_AUTH_SOCK"