Live data from Hacker News

Mosh Mobile Shell

mosh.org

41–50 of 80 posts

Re: Mosh Mobile Shell

#41
post #2

Last commit to master was over two years ago, has mosh been replaced by something else or is the project just "complete"?

I have replaced it with Eternal Terminal: https://github.com/MisterTea/EternalTerminal But I don't know how widespread that is.

Same here. I tried a while back and nearly immediate switched over to using it over Mosh, for the same reasons you gave.

Re: Mosh Mobile Shell

#44
post #37
post #29

When mosh came out back in 2013, it solved a pretty real problem of ssh crapping out when you changed networks (like moving from in-office to home). It solves it at the app layer and uses UDP and is designed to work in high loss / latency environments. Very cool. At the same time, in recent years, I've found that ssh running on top of Wireguard / Tailscale is way more usable than 2013 days. Those latter tools address…

The killer use case was roaming IPs, but I'd say the killer use case today is battling latency. A lot more people are computing remotely now, even on their phones. Even with 5Guw, I still get bursts of crappy latency. And now some people are using 5G as their home internet. It definitely solves problems when traveling and dealing with crappy airport/hotel/AirBnB/conference wifi that is slow or overloaded.

I used to use mosh when riding Amtrak and using the free wifi. Without it, I rarely could even stay connected long enough to run more than a command or two, but using mosh completely solved it. I had no idea people considered handling changes in the IP to be the primary use case.

Re: Mosh Mobile Shell

#45
Hey all, I’ve been working on an open source rust-based alternative to mosh that solves some of the key issues like scroll back and using WebRTC instead of bootstrapping udp over ssh (which doesn’t work on firewalled networks). Would love any feedback on which features you’d like to see!

Re: Mosh Mobile Shell

#46
mosh is neat, but I've mostly switched back to good'ol SSH over Tailscale due to various rendering bugs caused by client-server mismatches as well as the lack of port forwarding.

Basically mosh attempts to synchronize the state of the terminal which is made up of character cells. It sounds simple until you realize that unicode and fancy escape sequences exist, and the behavior of the client and the server must match otherwise you get weird misalignments that are difficult to debug:

- Unicode 9+ changed character width computation a lot, but macOS `wcwidth` still follows the old algorithm. Let's patch it: https://github.com/mobile-shell/mosh/pull/1289

- There is no support for strike-through and dimmed styles. Let's patch it: https://github.com/mobile-shell/mosh/pull/1059

- What about underline/undercurl? Let's patch it: https://github.com/jdrouhard/mosh/commit/aff5e1c3db9f061deb2...

- Some emojis don't take up two cells as expected? Again, let's patch it: https://github.com/jdrouhard/mosh/commit/b31161ab311c7b6e306...

- ...

You really need those patches to have a good experience, and popular mosh clients like Blink on iOS incorporate them in their builds. However, things look wonky if you don't use the corresponding server builds, and you don't want to dig through layers of abstractions to find out why selecting lines in a specific file in neovim causes everything to become a jumbled mess every so often.

There is no end in sight for those patched to be merged upstream, no end in sight for distros to ship new versions, and no end in sight for protocol changes to make state synchronization more resilient. So, back to SSH we go...

Edit: Fixed wrong link for underline/undercurl patch

Re: Mosh Mobile Shell

#47

Earlier quoted context omitted.

I have replaced it with Eternal Terminal: https://github.com/MisterTea/EternalTerminal But I don't know how widespread that is.

I used ET but it requires a server process also. Some machines are too locked down to allow this. Wish there was a way to kick start the server on demand.

Uh, mosh needs to be installed to the server as well?

Re: Mosh Mobile Shell

#48
post #32

Unfortunate name. "Mosh" is pronounced exactly as "moche", the French word for "ugly".

Eh, "git" is an unpleasant or contemptible person. "mercurial" is subject to sudden or unpredictable changes of mood or mind. Neither of them ran into any issues due to their names. I think it's really only a problem if a word is offensive/inappropriate enough that people would hesitate to say it in a work conference room. For example, the GNU Image Manipulation Program is something I would hesitate to name depending on how senior the leadership is in the room.

Re: Mosh Mobile Shell

#49
post #44
post #37

Earlier quoted context omitted.

The killer use case was roaming IPs, but I'd say the killer use case today is battling latency. A lot more people are computing remotely now, even on their phones. Even with 5Guw, I still get bursts of crappy latency. And now some people are using 5G as their home internet. It definitely solves problems when traveling and dealing with crappy airport/hotel/AirBnB/conference wifi that is slow or overloaded.

I used to use mosh when riding Amtrak and using the free wifi. Without it, I rarely could even stay connected long enough to run more than a command or two, but using mosh completely solved it. I had no idea people considered handling changes in the IP to be the primary use case.

Even my home wifi sometimes has enough packet loss to kill SSH connections. And if my computer sleeps for a even a quarter-second, yeah, connection dead.

Mosh means a lot less, "Sigh..." up-arrow, enter. A small thing, but why live with it when you can just not?

Re: Mosh Mobile Shell

#50
post #29

When mosh came out back in 2013, it solved a pretty real problem of ssh crapping out when you changed networks (like moving from in-office to home). It solves it at the app layer and uses UDP and is designed to work in high loss / latency environments. Very cool. At the same time, in recent years, I've found that ssh running on top of Wireguard / Tailscale is way more usable than 2013 days. Those latter tools address…

I feel a bit silly for not noticing this before. Over the last year or so I've often wondered when ssh added protocol-level support for session resume. I'd open my laptop on a new network and everything would be ready to go. But of course, it's nothing to do with ssh, it's just that I started using tailscale.

And really they didn't even do anything special. This was a killer reason we loved Wireguard at our company and pitched heavily to keep it around to he company who acquired us and wanted us to switch to their VPN Appliance instead.
Post reply on HN