by ikornaselur · 5y ago · 0 comments
I do just use default settings (just always set up mosh server on my remote servers and forget about it), but is it possible that there's some timeout on the other end you could be experiencing? If for any reason you kill the session on the other side, then of course it doesn't work, but for me it's always magically connected again.
I've used Mosh for multiple years, always loved it, until recently when I started using tmux more. For some reason I had loads of problems with colours and the only solution I could find was to manually build it from source with some flags, or even potentially it was a fork or something like that. Just started SSH-ing again (usually have a stable and fast connection) and if I lose the connection, I'll just re-attach the tmux session anyway.
I actually use tmux in combo and don't see any color issues that I notice. I wonder if it's something about the colors in your tmux config?
I run tmux (locally, nesting another session on the Mac) but I don't think that would make a difference here.
I'm not aware of any special config, but I've been using this setup for several years with no major adjustments.
# tmux auto attach or create new session [ -z "$TMUX" ] && { tmux attach || exec tmux new-session && exit;}