Live data from Hacker News

Mosh

jefftk.com

41–50 of 152 posts

Re: Mosh

#41
post #5

Eternal Terminal ‘et’ is like Mosh but functionally better. Doesn’t break scrollback. Transparent to tmux control mode. I switched from Mosh to et across 12ish servers around 6 months ago and am way happier for it. https://eternalterminal.dev/ Previous conversation: https://news.ycombinator.com/item?id=21640200

ET uses a layer above TCP to make connections persistent, while mosh uses UDP which is better for high-latency or flaky connections (like 4G or wifi). For the use case in the original post with a congested wifi network, mosh is probably going to provide a better experience.

I use Blink on my iPad, as it supports mosh for ssh connections. As iPadOS sets limits for background execution and quickly kills apps, it is great to be able to reconnect to your running session.

Re: Mosh

#42
post #5

Eternal Terminal ‘et’ is like Mosh but functionally better. Doesn’t break scrollback. Transparent to tmux control mode. I switched from Mosh to et across 12ish servers around 6 months ago and am way happier for it. https://eternalterminal.dev/ Previous conversation: https://news.ycombinator.com/item?id=21640200

Looking at Eternal Terminal, it doesn't have the same "local echo" feature that minimises the effect of latency in a cli environment. Thats the trade-off. The "local echo" feature is what I use mosh for as I deal with system 8 to 10 timezones away. Doing this breaks scrollback. I guess when mosh was first made, this was a problem with ssh shell sessions over EDGE or 3G as well, although network latency is less of a c…

The lack of scrollback is what stopped me from using mosh before. I never knew about Eternal Terminal, but I've just installed it and it seems to work well (my issue is unreliable connections, rather than latency, so the lack of prediction doesn't affect me as much)

Re: Mosh

#43

Earlier quoted context omitted.

What about using GNU screen inside a mosh connection like that: mosh server -- screen -xRR -D You then can use the scrollback buffer provided by screen with Ctrl-a, ESC and then the usual Up/Down and PgUp/PgDown buttons.

Yeah, I do something similar with tmux. You can even get mouse scrollback to work properly by setting the option in the conf file. Here some medium article about this - https://medium.com/@toja/tip-using-mosh-with-scrollback-257a...

For some reason scrollback mouse integration works well till one disconnects and reconnects, and then suddenly it's broken.

Re: Mosh

#44
post #8

The article misses the other great feature of Mosh: It never get disconnected, regardless of the client's state (IP address change, or device sleep mode), and you will never loose terminal sessions. When this is not so appealing to desktop users, it is a godsend feature for laptop/mobile users. Especially, if you are an iPad user you should try Blink shell app [1] with Mosh. This combination turns the iPad your favor…

Does mosh play well with MacOS?

Re: Mosh

#45
Mosh is awesome! The biggest issue I ran into was it being UDP based - lots of places lock down UDP even over VPNs - and if your client dies there is no way to reconnect. However as long as the client is active it is pretty bulletproof. Hopefully http/3 will cause people to loosen up UDP rules a bit.

Re: Mosh

#46
post #21
post #8

The article misses the other great feature of Mosh: It never get disconnected, regardless of the client's state (IP address change, or device sleep mode), and you will never loose terminal sessions. When this is not so appealing to desktop users, it is a godsend feature for laptop/mobile users. Especially, if you are an iPad user you should try Blink shell app [1] with Mosh. This combination turns the iPad your favor…

> The article misses the other great feature of Mosh: It never get disconnected, regardless of the client's state (IP address change, or device sleep mode), and you will never loose terminal sessions. I almost switched to mosh in the past while searching for this kind of solution to short-living ssh connections. But I've finally never made the jump, re-launching ssh/tmux being four keystrokes only (up+enter x2). Not…

Does the keepalive functionality in ssh help here? Like:

ssh -o ServerAliveInterval=5 -o ServerAliveCountMax=1 $HOST

Re: Mosh

#47

I started using mosh a few weeks ago when I was working over ssh more. Even for working over LAN it was attractive because I'm really sensitive to typing latency. Don't be like the author and put off trying it, it's dead easy to install and try. No setup and no commitment to keep using it. However, I quickly ran into a problem which is that it breaks a scrollback. This is the one big problem with mosh and will probab…

Would running screen inside fix the scrollback problem for you? Like in alias server='mosh server -- screen -xRR -D' I recently switched to st from suckless-tools which does not have scrollback at all, and I start screen for every st window, so my scrollback experience is consistent between remote connections and local terminals.

screen brings its own set of pros and cons. I've used it for years but I'm not prepared to add that layer of complexity for every ssh session I open.

Re: Mosh

#48

I started using mosh a few weeks ago when I was working over ssh more. Even for working over LAN it was attractive because I'm really sensitive to typing latency. Don't be like the author and put off trying it, it's dead easy to install and try. No setup and no commitment to keep using it. However, I quickly ran into a problem which is that it breaks a scrollback. This is the one big problem with mosh and will probab…

Terminal emulators (xterm, iterm2 etc) are emulating something like a VT220 which were called "glass terminals" to differentiate them from earlier terminals which were keyboards attached to printers. So there's still this underlying concept of an endless spool of paper, and that's what you see when you scroll back. A scroll is literally a long piece of paper. Anyway that means if you cat some long file and then hit c…

The main trouble with using screen for scrollback is it introduces latency when I need to scroll, and that's exactly the problem I was trying to solve when using mosh in the first place! Maybe I could completely change the way I work, but for now I'll continue to put up with typing latency and other problems with ssh.

Re: Mosh

#49
I'll just add that mosh is excellent. I started using it on a trip to the other side of the world. The ssh latency was terrible, and mosh saved the day.

Re: Mosh

#50
post #44
post #8

The article misses the other great feature of Mosh: It never get disconnected, regardless of the client's state (IP address change, or device sleep mode), and you will never loose terminal sessions. When this is not so appealing to desktop users, it is a godsend feature for laptop/mobile users. Especially, if you are an iPad user you should try Blink shell app [1] with Mosh. This combination turns the iPad your favor…

Does mosh play well with MacOS?

Yes. I run a small Ultima Online custom server and it runs on a Debian box in a datacenter. My primary development machine is my macbook, and mosh-ing to my server is flawless, even from congested coffee shop wifi. The best part is I can use juicessh to mosh in from my phone if I need/want to as well!
Post reply on HN