As someone who codes on a remote server the whole day, mosh is absolutely necessary and it is fantastic

Advantages:

- you dont see any lag when you type, it is exactly as if you were on your local machine

- when network disconnect, the terminal freeze and when network is up again, the terminal becomes interactive again preserving everything in between

- connection is preserved as long as the terminal is open, so even after hibernation your session is preserved

Drawbacks:

- you can't scroll , but if you use tmux then it is possible . I've tried using Eternal terminal, as it allows to scroll but it doesn't perform well at all on laggy connections

- You can't detach and re attach mosh connections (same for ET)

- I'm not sure it is possible to preserve middle-click copy/paste (at least I've not managed to make it work)

- time to connect is a bit longer than normal ssh

But you do see lag - if you have auto/tab-complete, history search, command suggestions, etc, those all will still lag because they are waiting for a response from the server.

The lag that is eliminated is the local echo of characters as you type, as mosh is sending those asynchronously in the background. If you have fancy, more interactive prompt/cmdline on the remote server then you'll still see the issue.

Ditto if you run tmux on the remote server. I really wanted to like/use mosh, but there's too many issues of reality that it can't gloss over.

If you're just maintaining basic SSH sessions into remote servers, then it's great. But if you have a nice, interactive remote development environment then you still get the same lag and latency issues.

But what’s the alternative? Local development with syncing back to a server?

The lag is something that I can deal with. For me, the killer feature is the automatic reconnects. I usually only use mosh when I’m traveling and at conferences. In that scenario, I’m either using my iPad (with keyboard) where the client might be killed anytime I switch apps or I’m using the conference WiFi, with is always spotty. In either case, using a mosh client makes me less likely to throw my laptop or iPad down in anger every 5 minutes.

>But what’s the alternative? Local development with syncing back to a server?

I'd say this is a perfectly fine solution for a lot of cases. Not all, of course, like your iPad one sounds a great fit for mosh (and I'm gonna try it out!) But even a RaspberryPi can power a really powerful terminal.

You can use sshfs[0] to mount a remote drive over ssh. Obviously there will still be some lag - `ls` will require a round trip - but your local terminal will be much snappier.

[0] https://github.com/libfuse/sshfs