Live data from Hacker News

Mosh Mobile Shell

mosh.org

21–30 of 80 posts

Re: Mosh Mobile Shell

#21

I used to use this but ran into too many small issues that ended up outweighing the benefit compared to a plain-old ssh connection. Personally, I'm hoping for a QUIC-based alternative that reaps the benefits of being able to change IP addresses and recover from intermittent connection loss without any of the typing prediction stuff from mosh.

What sorts of issues?

Re: Mosh Mobile Shell

#22

I've tris Mosh several times and never found any tangible benefit in any scenario.

A small but noticeable qol improvement when managing servers on the other side of the world. Reliable but fundamentally high latency connection made for annoying ssh, while mosh made it feel like localhost.

Re: Mosh Mobile Shell

#24
post #17
post #7

Mosh is so good, but their unwillingness to implement OSC52 for copying to clipboard sent me back to tmux.

I think this actually works now, I use both tmux and mosh and can copy things fine. See e.g. https://gist.github.com/yudai/95b20e3da66df1b066531997f982b5...

Don't know the context for that snippet you're sharing, but the issue for OSC 52 support for clipboard syncing is marked as `Open` in the Mosh repo https://github.com/mobile-shell/mosh/issues/637

Re: Mosh Mobile Shell

#25
I absolutely love mosh! I use mosh to connect to my tmux server at work, so I don't need to worry about connection drops. Once I was in Europe editing a file, then came home, connected to my work VPN, and was right back in the same vim session.

Re: Mosh Mobile Shell

#26

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.

Can you tell us why you made the switch?

Sure. I guess caveat I haven't used Mosh in a while, so maybe things have changed.

Mosh paints the screen, meaning no native scrollback. You have to use a multiplexer like tmux to get it. But ET has native scrollback. This is the biggest one for me.

Couple years ago I was on a more limited network that constrained usage of UDP which Mosh uses. ET uses TCP.

Mosh buffers inputs locally first which gives it the appearance of low latency but that illusion breaks when there are network issues. I prefer ET, even tho it can appear slower, since network issues are more obvious and I can troubleshoot them. But on a good connection, they're indistinguishable to me.

Those are three. There may be more. Honestly they are probably still more or less interchangeable for most. No reason to switch if you love Mosh.

Re: Mosh Mobile Shell

#27

I used to use this but ran into too many small issues that ended up outweighing the benefit compared to a plain-old ssh connection. Personally, I'm hoping for a QUIC-based alternative that reaps the benefits of being able to change IP addresses and recover from intermittent connection loss without any of the typing prediction stuff from mosh.

What sorts of issues?

This is going back around 8 years so my memories aren't perfect and the issues could have been fixed by now. IIRC my biggest gripes were:

1. There was no scroll-back so you could only see 1 terminal screen of output. If you scrolled back, the text would be wrong or truncated or something like that. We would work around this by launching a tmux session and using that for scroll-back, but tmux scroll-back over a remote connection is so much clunkier than scrolling back in your local terminal emulator. If I'm already launching a tmux session, then I don't need mosh's ability to recover from broken connections because I can re-attach to tmux.

2. I found the typing prediction to be more annoying than it is worth. It worked great in bash but interactive apps (like those based on ncurses), the app would often end up a distorted mess until the round-trip to the server got back the real/correct rendering from the server. If I'm waiting for a round-trip from the server then I'm not getting any benefit from mosh's predictive typing.

3. It was only a remote terminal replacement. If you're doing anything more over ssh (port forwards, x11 forwarding, etc) then you're going to run into all the normal ssh issues anyway.

4. You had to run a 3rd party script to kill old abandoned mosh sessions. This is a consequence of being able to re-attach after a broken connection: the mosh server has no idea if you're coming back or not, so it leaves your session there. At least with tmux I can list the active sessions, re-attach to them, see what they're doing, and destroy them at will. With mosh, you could only reconnect to an old session if you hadn't closed mosh on your laptop. If your laptop powered off (intentionally or not) then you could either play "guess which mosh pid to kill" or leave your mosh session running long enough for the mosh killer script to get it.

Also there was the issue of popularity/network effects. ssh is everywhere, mosh is not, and its hard to argue that mosh should be everywhere when I was getting only slight benefit from it. This isn't mosh's fault, any ssh competitor that isn't upstreamed into openssh is going to run into the same exact problem.

With my hypothetical ssh-over-QUIC I'm hoping for just plain-old ssh with all the normal features, just using QUIC instead of TCP. Ideally upstreaming into openssh. I know there are a bunch of projects out there attempting something like ssh-over-QUIC but I think it has to be upstreamed and a drop-in replacement to overcome the popularity moat regular ssh has built.

Re: Mosh Mobile Shell

#28
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.

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.

Re: Mosh Mobile Shell

#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 roaming IP issues directly at the network layer.

So while there are still issues with ssh / TCP if you're on a really crappy network (heavy packet loss, satellite link, etc), those have been less common in my experience compared to IP changes.

The “killer use case” for Mosh feels a lot less killer now.

Post reply on HN