6

tmux on startup and ssh-agent forwarding issue

view full story
linux-howto

http://unix.stackexchange.com – I've added the following lines (taken from here) to my .bashrc to automatically start a tmux session on login: if [ "$PS1" != "" -a "${STARTED_TMUX:-x}" = x -a "${SSH_TTY:-x}" != x ] then STARTED_TMUX=1; export STARTED_TMUX sleep 1 ( (tmux has-session -t remote && tmux attach-session -t remote) || (tmux new-session -s remote) ) && exit 0 echo "tmux failed to start" fi However, this seems to breaks ssh agent forwarding on subsequent logins. Is there a way around this? (HowTos)