Live data from Hacker News

Mosh

jefftk.com

31–40 of 152 posts

Re: Mosh

#31

Earlier quoted context omitted.

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.

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

Re: Mosh

#32

I've used mosh extensively over the last few years with very few issues. It composes well with tmux. The only barrier to me really advocating it is the lack of support for bastion hosts and working around firewalls.

I’ve used ZeroTier to solve most of that sort of network issues.

Re: Mosh

#33
post #30
post #20

Earlier quoted context omitted.

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 phys…

I sometimes use Prompt with the on-screen keyboard when I'm working out on a treadmill. It's neither pleasant nor productive, but it's okay.

Btw, tmux scrollback sucks except when the terminal emulator's native scrollback is supported through control mode.

Re: Mosh

#34
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,…

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

what difficulties are you facing there? i use tmux deeply nested without problems. one trick i use is to change the tmux command key to be something different on each nesting level.

Re: Mosh

#35
post #34
post #16

Earlier quoted context omitted.

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,…

> 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. what difficulties are you facing there? i use tmux deeply nested without problems. one trick i use is to change the tmux command key to be something different on each nesting level.

> one trick i use is to change the tmux command key to be something different on each nesting level.

This is exactly the difficulty I never want to see...

Re: Mosh

#36
post #25
post #21

Earlier quoted context omitted.

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

Exactly. Close the laptop, connect to another network... as soon as you connect the network again you’re still on the server and your long running process still runs there.

Re: Mosh

#37

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".

When I first found out about mosh, I imagined it would work seamlessly even with servers that don’t have the mosh server installed by auto-installing itself.

If mosh could do this, I would `alias ssh=mosh` and use it all the time.

Otherwise I need to remember which servers have mosh installed, and for those that don’t I need to ssh in, apt-get mosh, disconnect, and reconnect with mosh.

I’d imagine it could either just scp a binary over to the target system (in the case of insufficient privileges) or use the system package manager to install itself.

Re: Mosh

#38
Mosh has been a godsend while working from home the last few weeks. Especially because despite my company and all its employees being in India, we host all our servers in the US to 'keep up appearances'.

Re: Mosh

#40
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

I've tried both. I've found (data point of one) that mosh is better in high latency network situations.
Post reply on HN