Add above to your shell profile
Form your temrinal use:
rts SESSION_NAMEThe will create a remote tmux session or attach to an existing one.
Useful when travelling or dealing with bad connectivity.
| # Open a new tmux session or attach to existing tmux session given a name | |
| rts() {ssh SSH_HOST -t "tmux attach-session -t $1 || tmux new -s $1";} |