Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I typically use ssh over wireguard and tmux if I need persistent sessions. Wireguard takes care of the unstable remote link and changing IPs. I can suspend my laptop on one connection, wake it up later on another and still have an active session. I use openssh via Termux for the client on Android or whatever terminal emulator on the laptop. Can mosh offer me anything?


mosh has very good latency hiding and your connection can actually be interrupted for longer than a TCP session would tolerate.

The latency hiding alone makes it worth it; SSH is miserable over links with any lag, mosh feels as responsive as typing locally until you get into hundreds of milliseconds of latency.


My setup is iPad + MBP + Linux server. I use mosh to connect, also with a Wireguard VPN, and have tmux running on the server. It's very convenient to pop open Blink on my iPad and have everything right where I left it (modulo changes made while on the MBP) and the reverse when I pull up the terminal on my MBP.

The main benefit for me is mobility, though, not the restore from sleep itself. When I started using this setup I was traveling quite a bit, including just locally (living in a downtown area, I'd start on something in the apartment, then decide to go to the coffee shop, or the growler place, and continue working). Not having to reestablish the connection (even using SSH certs that's still some friction) was very pleasant.

The second is when dealing with an unreliable network. Though this is less common these days, when I started with it I had a lot of issues in my apartment thanks to a neighbor with a noisy microwave oven.


Can you speak to the experience of coding on the iPad? I have been considering picking one up for personal reasons but the price seemed prohibitive when I thought it simply could not be used for portable work purposes at all.


It works well for me, but I have a personal preference for command line tools. I use emacs as my editor and am able to do everything I need on my Linux server (this is strictly for personal/hobby programming). There are a couple good source code aware (but not project aware) text editors for the iPad that work well with Working Copy, a really nice git client for iPad. On occasions when the Linux server was not enough, I set up Github Actions to respond to commits made through the use of Working Copy + an editor (Textastic in my case, though I'm not ecstatic about it, it does get the job done).

I'd prefer a real IDE on a few occasions (work is C# and Java). Trying to do some side projects to relearn or expand my knowledge of them and their libraries was infeasible on the iPad alone.

In the end, my conclusion is that if you don't need an IDE and can use a CLI or git-based workflow, then the iPad is a fine tool for programming and writing in general. I'm not even stymied by the relatively small screen, it's still better than the monitors I grew up with. The fullscreen and split screen modes also work well with my particular manner of maintaining focus on tasks (I use fullscreen/split screen on my MBP almost exclusively as well).


Mosh apparently fixed the lag issue where typing is very slow on far away servers. Trying to ssh a server on the other side of the world is annoying.


> Wireguard takes care of the unstable remote link and changing IPs.

Isn't that the point of mosh?

"Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes."




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: