add tmux ssh agebt fix

parent dcb27230
Pipeline #61601348 passed with stages
in 2 minutes and 14 seconds
......@@ -9,3 +9,24 @@
tmux -2 new-session -s $WHOAMI
fi
fi
## Fix SSH agent when attaching to existing tmux session
[source](https://stackoverflow.com/questions/21378569/how-to-auto-update-ssh-agent-environment-variables-when-attaching-to-existing-tm)
- Create file `~/.ssh/rc` with content:
#!/bin/bash
# Fix SSH auth socket location so agent forwarding works with tmux
if test "$SSH_AUTH_SOCK" ; then
ln -sf $SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
fi
- Make it executable
chmod u+x ~/.ssh/rc
- Specify SSH auth socket by adding this to your `~/.bashrc`:
export SSH_AUTH_SOCK=$HOME/.ssh/ssh_auth_sock
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment