Live data from Hacker News

Mosh

jefftk.com

21–30 of 152 posts

Re: Mosh

#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 justifying changing the whole paradigm. Plus you get the additional bonus with tmux to be able to recover the same remote terminal sessions when switching computers (leave stuff in place at work, go home, continue on the same stuff at home).

Edit: maybe it's the time for jumping ships!

Re: Mosh

#22
You need to install a server in the server for this to work. That is, if you are using SSH to log in to server farms as a "user" (as opposed to a server farm admin), then you cannot just "use mosh".

Re: Mosh

#23

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.

Re: Mosh

#25
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…

Well, just run tmux with Mosh. It gets even better.

Re: Mosh

#26
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…

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.

Re: Mosh

#27
post #16

Earlier quoted context omitted.

Having extremely little knowledge of how these things work and thus a strong personal resistance to them (I only started using tmux recently, and exclusively with iTerm’s integration for its “control center” mode, just so I don’t lose sessions if my SSH disconnects), I’m seeing a lot of setup and caveats and am a bit scared off by these. This one looks nice because it has scrollback (essential) but it seems to requir…

There are moments that tmux's persist session won't work well such as opening nested SSH sessions to another machine with nested tmux to keep the session. Also, tmux does not handle SSH sessions, so if a SSH session disconnected (e.g. WiFi signal lost, your macBook gets sleep mode), you need to manually restart the SSH session and run tmux again, whereas Blink and ET never disconnects the SSH session. On top of that,…

Right, I see how it can be more convenient but I also see caveats so I’m not sure if I should bother. I’m not really a fan of installing much, either: often I don’t really want to do a whole install to get into a machine (some random AWS for instance) or I just can’t (not my machine, no admin privileges, paltry package manager, …)

Re: Mosh

#29
Mosh is fantastic. And as an old-timer I am rather amused how some good ideas from a while back make its way into current hot tech again. After all, the IBM 3270 terminal was specifically designed to not transmit one character at a time. Thanks to this, a 1970s-era IBM 3033 mainframe fitted with only 16 MB of main memory was able to support up to 17,500 3270 terminals. (see https://en.wikipedia.org/wiki/IBM_3270)

Re: Mosh

#30
post #20
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…

Of course there’s also the big problem of lack of scroll back in mosh as mosh actually handles the terminal emulation. I suppose this would be especially bad on an iPad with an on-screen keyboard, as the number of lines would be severely limited. How does Blink handle this problem? (I use Prompt 2 on my 12.9’’ iPad Pro which doesn’t support mosh. I only use mosh on computers with very high latency servers.)

Yeah, Blinks doesn't handle the scrollback problem neither. I always use a bluetooth keyboard when I connect the shell so I launch tmux inside of it, so I use tmux's scrollback feature. Besides I don't much need scrollback when I use iPad anyway.

I have to admit that terminal is inherently not suited for touchscreen. Here I am suggesting iPad Pro a laptop alternative for a dedicated terminal use, where you use a physical keyboard.

Post reply on HN