REMOTEIP=`echo $SSH_CONNECTION |sed -e 's/::ffff://g' -e 's/ .*//g'`
if [ -z "$SSH_CONNECTION" ]; then if [ "$TERM" != "tmux" ]; then tmux attach -t $REMOTEIP || tmux new -s $REMOTEIP ; fi ; fi
I have static IPs and I like to come back to a server the way I left it the day before, from home or work.
For pratical reasons (everything in one window), I often have tmux running inside GNU screen, with one GNU screen per remote server.
REMOTEIP=`echo $SSH_CONNECTION |sed -e 's/::ffff://g' -e 's/ .*//g'`
if [ -z "$SSH_CONNECTION" ]; then if [ "$TERM" != "tmux" ]; then tmux attach -t $REMOTEIP || tmux new -s $REMOTEIP ; fi ; fi
I have static IPs and I like to come back to a server the way I left it the day before, from home or work.
For pratical reasons (everything in one window), I often have tmux running inside GNU screen, with one GNU screen per remote server.