add tmux ssh agebt fix

parent dcb27230
Pipeline #61601348 passed with stages
in 2 minutes and 14 seconds
...@@ -9,3 +9,24 @@ ...@@ -9,3 +9,24 @@
tmux -2 new-session -s $WHOAMI tmux -2 new-session -s $WHOAMI
fi fi
fi fi
## Fix SSH agent when attaching to existing tmux session
- Create file `~/.ssh/rc` with content:
# 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
- 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