Both. mosh to survive the tunnels, tmux on the far end for scrollback and to keep state if the client machine goes away. Remember mosh wants UDP 60000-61000 open.