11 ms·
Mosh Mobile Shell
- geoffeg 1y agoLast commit to master was over two years ago, has mosh been replaced by something else or is the project just "complete"?
- Kilenaitor 1y agoI have replaced it with Eternal Terminal: https://github.com/MisterTea/EternalTerminal https://github.com/MisterTea/EternalTerminal But I don't know how widespread that is.
- sangeeth96 1y agoCan you tell us why you made the switch?
- Kilenaitor 1y agoSure. 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.
- sangeeth96 1y agoI’m sold just hearing “native scrollback”. Thanks for responding! :)
- silverlake 1y agoI 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.
- mbirth 1y agoUh, mosh needs to be installed to the server as well?
- _flux 1y agoWell yes, but mosh starts its server over an initial SSH connection used for setup, so you only need the binary to exist in PATH of the remote host and you're done. It's more difficult to arrange a service to be running; sometimes more so if you don't have root.
- kstrauser 1y agoSame here. I tried a while back and nearly immediate switched over to using it over Mosh, for the same reasons you gave.
- iberator 1y agoWhy update if something is perfect? Like in the old days: final version :) wait for new one in few years :)
- p0deje 1y agoIt's a great project. I remember years ago, I suffered from intermittent SSH issues when using Vagrant with AWS, and I ended up writing a plugin[1] to replace `vagrant ssh` with `vagrant mosh`, which fixed most of my disconnects. It's a pity Mosh is not supported widely! [1]: https://github.com/p0deje/vagrant-mosh https://github.com/p0deje/vagrant-mosh
- craftkiller 1y agoI 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.
- esseph 1y agoPls don't take away arguably the best feature! :-)
- wavemode 1y agoWhat sorts of issues?
- craftkiller 1y agoThis 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.
- lostdog 1y agoMosh is so good, but their unwillingness to implement OSC52 for copying to clipboard sent me back to tmux.
- robenkleene 1y agoEternal Terminal works as well as Mosh for me and supports OSC52. I switched to et in order to sync my remote tmux clipboard with my local clipboard.
- hiq 1y agoI think this actually works now, I use both tmux and mosh and can copy things fine. See e.g. https://gist.github.com/yudai/95b20e3da66df1b066531997f982b57b https://gist.github.com/yudai/95b20e3da66df1b066531997f982b5...
- robenkleene 1y agoDon'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 https://github.com/mobile-shell/mosh/issues/637
- hiq 1y agoTo be fair I haven't tested mosh without tmux, I always have tmux running. So I guess the situation is that it's possible to make it work with tmux, but maybe mosh on its own doesn't support OSC52. Which for me is good enough.
- semiinfinitely 1y agoI've tris Mosh several times and never found any tangible benefit in any scenario.
- snickerdoodle12 1y agoIt's great for SSH from my phone. The connection is just there whenever I unlock my phone.
- _flux 1y agoYes, but I've also found that I can have ssh open from phone for days to my home computer, if I've established it over a VPN (in my case wireshark). I suppose this didn't always use to be the case, though.
- kzrdude 1y agoClose laptop and it's fine. Open laptop next day at work and your session is still there, it just reconnects itself. It's quite satisfying.
- robenkleene 1y agoDoesn't SSH drop if the connection drops? I keep my connections with Mosh/Eternal Terminal open for weeks or even months at a time, when devices are going in and out connectivity many times.
- esseph 1y agoWorking on servers via ssh over mobile hotspot Mosh is a lifesaver
- nothrabannosir 1y agoA 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.
- psanford 1y agoI found the "lets pretend like there is no input latency" thing to be more distracting than useful. As soon as something does not work as expected the illusion is broken. It made me more grumpy than not having it on in the first place.
- hosh 1y agoI had the opposite experience. I have worked remotely without mosh. The choppiness of responses was more distracting than pretending that the network will always be reliable.
- esseph 1y agoWhen doing sysadmin or neteng tasks in remote areas and sometimes on crappy lossy internet, I wish this was on every device. I haven't touched mosh in at least 10 years. JuiceSSH is still my go-to android ssh/mosh client.
- meepmorp 1y agoI've tried mosh several times and always found it to be more annoying than tmux/screen + living with the reality of dropped connections on mobile.
- xixixao 1y agoWhich app ppl use on iOS, the new Blink Shell? Is anyone directing Claude from the phone with it?
- kstrauser 1y agoI switched from Blink to Prompt after many years. I can't speak to Claude, but Emacs and Vim work well in it.
- mqtx 1y agoI 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.
- kenrose 1y agoWhen 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.
- swinglock 1y agoIt still improves the latency situation.
- jedberg 1y agoThe killer use case was roaming IPs, but I'd say the killer use case today is battling latency. A lot more people are computing remotely now, even on their phones. Even with 5Guw, I still get bursts of crappy latency. And now some people are using 5G as their home internet. It definitely solves problems when traveling and dealing with crappy airport/hotel/AirBnB/conference wifi that is slow or overloaded.
- saghm 1y agoI used to use mosh when riding Amtrak and using the free wifi. Without it, I rarely could even stay connected long enough to run more than a command or two, but using mosh completely solved it. I had no idea people considered handling changes in the IP to be the primary use case.
- slipperydippery 1y agoEven my home wifi sometimes has enough packet loss to kill SSH connections. And if my computer sleeps for a even a quarter-second, yeah, connection dead. Mosh means a lot less, "Sigh..." up-arrow, enter. A small thing, but why live with it when you can just not?
- pgib 1y agoMosh has been solid for so long. Love it.
- saidinesh5 1y agoThese days i quite like using shpool: https://github.com/shell-pool/shpool https://github.com/shell-pool/shpool I used to use mosh, tmux before but always got annoyed how they broke scrolling , searching etc.. Especially when yakuake already provides half the functionality i used to rely on tmux for..
- lotharcable 1y agoThat shpool looks like a good idea.
- thrance 1y agoUnfortunate name. "Mosh" is pronounced exactly as "moche", the French word for "ugly".
- craftkiller 1y agoEh, "git" is an unpleasant or contemptible person. "mercurial" is subject to sudden or unpredictable changes of mood or mind. Neither of them ran into any issues due to their names. I think it's really only a problem if a word is offensive/inappropriate enough that people would hesitate to say it in a work conference room. For example, the GNU Image Manipulation Program is something I would hesitate to name depending on how senior the leadership is in the room.
- linsomniac 1y agoMosh is excellent, but I've mostly switched to wezterm for similar functionality. It doesn't really persist as well over network changes, but it does allow reconnecting to a terminal session on another box, and it gives some of the type-ahead functionality. What I really like about it is the reconnect and that I have remote, first-class terminal experience, compared to tmux/screen.
- dunham 1y agoI tried mosh years ago, but ended up settling on "ShellFish" by the same guy who wrote "Working Copy". It can reconnect if you use a tmux session, and it has the ability to preview remote files and interact with the Files application on iOS (presenting the remote filesystem in Files).
- 0xCMP 1y agoI used to heavily use Blink Shell, but a combination of changes to their application and also that ShellFish + Tailscale is so easy and reliable made me switch entirely to ShellFish as well. I also enjoy the ability to quickly launch/manage Digital Ocean instances useful sometimes as well.
- syassami 1y agoFond memories of moshing while ssh'ing into remote machines and tethering off my phone on the Caltrain. Great product
- exographicskip 1y agoSame. Just substitute the Sounder a couple states up ;)
- just_human 1y agoHey all, I’ve been working on an open source rust-based alternative to mosh that solves some of the key issues like scroll back and using WebRTC instead of bootstrapping udp over ssh (which doesn’t work on firewalled networks). Would love any feedback on which features you’d like to see!
- pilooch 1y agoHello, very interested in the scrollback! I've used mosh for 10+ years and it still runs my 100+ opened terminals to this day ! Would love to try your alternative
- just_human 1y agoAwesome! I’ll post it to HN once I have the repo up and the code is in a halfway decent state. Look forward to your feedback!
- ChocolateGod 1y ago> Would love any feedback on which features you’d like to see! Not leaving pull requests for over half a decade fixing critical issues with not even bothering to comment on them would probably be a massive advantage over Mosh.
- just_human 1y agoHah, I’ll aspire to do better!
- newman314 1y agoDo you have a link to a GitHub repo for this? Also, will it be mosh compatible?
- just_human 1y agoNot yet, but hope to have something up in September! It’s unfortunately not most compatible - I thought about that but didn’t see a lot of value and there were some downsides like re-implementing an encryption layer that doesn’t make sense if you use WebRTC. Just curious, what’s your use case for mosh compatibility?
- watusername 1y agomosh is neat, but I've mostly switched back to good'ol SSH over Tailscale due to various rendering bugs caused by client-server mismatches as well as the lack of port forwarding. Basically mosh attempts to synchronize the state of the terminal which is made up of character cells. It sounds simple until you realize that unicode and fancy escape sequences exist, and the behavior of the client and the server must match otherwise you get weird misalignments that are difficult to debug: - Unicode 9+ changed character width computation a lot, but macOS `wcwidth` still follows the old algorithm. Let's patch it: https://github.com/mobile-shell/mosh/pull/1289 https://github.com/mobile-shell/mosh/pull/1289 - There is no support for strike-through and dimmed styles. Let's patch it: https://github.com/mobile-shell/mosh/pull/1059 https://github.com/mobile-shell/mosh/pull/1059 - What about underline/undercurl? Let's patch it: https://github.com/jdrouhard/mosh/commit/aff5e1c3db9f061deb2e85f5bbd243213847b348 https://github.com/jdrouhard/mosh/commit/aff5e1c3db9f061deb2... - Some emojis don't take up two cells as expected? Again, let's patch it: https://github.com/jdrouhard/mosh/commit/b31161ab311c7b6e306b4afced1632676fe2ab35 https://github.com/jdrouhard/mosh/commit/b31161ab311c7b6e306... - ... You really need those patches to have a good experience, and popular mosh clients like Blink on iOS incorporate them in their builds. However, things look wonky if you don't use the corresponding server builds, and you don't want to dig through layers of abstractions to find out why selecting lines in a specific file in neovim causes everything to become a jumbled mess every so often. There is no end in sight for those patched to be merged upstream, no end in sight for distros to ship new versions, and no end in sight for protocol changes to make state synchronization more resilient. So, back to SSH we go... Edit: Fixed wrong link for underline/undercurl patch
- nurettin 1y agoMosh + GNU screen: persistent auto-reconnecting terminal sessions
- Garlef 1y agoFunny sidenote: The mobile client for "Magic: the Gathering - Arena" does not even support "roaming" for your phones connection: If you for example turn off wifi during a match, it looses (and can not reestablish) the full connection even though your phone easily switches to mobile data.
- schlarpc 1y agoInteresting that it can’t reestablish the connection, as the application level protocol should support it just fine. The client should notice the GRE (game rules engine) TCP socket is broken, and reset everything. When you reconnect, the front door service should notify you to a GRE session still in progress, and the client should be able to rejoin that. At least, that’s how it works on desktop.
- Garlef 1y agoMy guess is that they get the parameters for the current connection from the phone context and then use a nonstandard library to establish the connection for maybe performance reasons. But then I think they did not bother to implement a mechanism for reconnecting.
- dang 1y agoRelated. Others? How ‘Mosh’ Rescued Me from Connection Hell: A Remote Work Story - https://news.ycombinator.com/item?id=35639011 https://news.ycombinator.com/item?id=35639011 - April 2023 (2 comments) Mosh: An Interactive Remote Shell for Mobile Clients (2012) [pdf] - https://news.ycombinator.com/item?id=33717028 https://news.ycombinator.com/item?id=33717028 - Nov 2022 (37 comments) Mosh 1.4.0 Released - https://news.ycombinator.com/item?id=33439542 https://news.ycombinator.com/item?id=33439542 - Nov 2022 (12 comments) Mosh's tolerance for high packet loss helps a guy escape from an elevator - https://news.ycombinator.com/item?id=28157117 https://news.ycombinator.com/item?id=28157117 - Aug 2021 (34 comments) Mosh: The Mobile Shell - https://news.ycombinator.com/item?id=28150287 https://news.ycombinator.com/item?id=28150287 - Aug 2021 (153 comments) Mosh - https://news.ycombinator.com/item?id=22810589 https://news.ycombinator.com/item?id=22810589 - April 2020 (148 comments) Mosh - https://news.ycombinator.com/item?id=18692618 https://news.ycombinator.com/item?id=18692618 - Dec 2018 (9 comments) Mosh v1.3 Released - https://news.ycombinator.com/item?id=14228591 https://news.ycombinator.com/item?id=14228591 - April 2017 (69 comments) ASK HN: How does mosh shell use UDP but provide reliability like TCP? - https://news.ycombinator.com/item?id=12519557 https://news.ycombinator.com/item?id=12519557 - Sept 2016 (1 comment) Mosh: the mobile shell - https://news.ycombinator.com/item?id=12429203 https://news.ycombinator.com/item?id=12429203 - Sept 2016 (49 comments) Mosh: the mobile shell - https://news.ycombinator.com/item?id=11572146 https://news.ycombinator.com/item?id=11572146 - April 2016 (147 comments) Mosh, the SSH Alternative Option for System Administration - https://news.ycombinator.com/item?id=11208757 https://news.ycombinator.com/item?id=11208757 - March 2016 (2 comments) Mosh – a robust, responsive replacement for SSH - https://news.ycombinator.com/item?id=8928506 https://news.ycombinator.com/item?id=8928506 - Jan 2015 (45 comments) Mosh: A replacement for SSH - https://news.ycombinator.com/item?id=8252093 https://news.ycombinator.com/item?id=8252093 - Sept 2014 (122 comments) Mosh (mobile shell) - https://news.ycombinator.com/item?id=6321474 https://news.ycombinator.com/item?id=6321474 - Sept 2013 (6 comments) Do you use Mosh? (SSH replacement) - https://news.ycombinator.com/item?id=5729004 https://news.ycombinator.com/item?id=5729004 - May 2013 (4 comments) Mosh: the mobile shell - https://news.ycombinator.com/item?id=5016745 https://news.ycombinator.com/item?id=5016745 - Jan 2013 (89 comments) Mosh: the mobile shell - https://news.ycombinator.com/item?id=4588239 https://news.ycombinator.com/item?id=4588239 - Sept 2012 (1 comment) Mosh: SSH for 2012 - https://news.ycombinator.com/item?id=3819382 https://news.ycombinator.com/item?id=3819382 - April 2012 (193 comments) Mosh: the mobile shell - https://news.ycombinator.com/item?id=3814589 https://news.ycombinator.com/item?id=3814589 - April 2012 (2 comments)
- mcsniff 1y agoI'm a heavy user of mosh on both iOS and Android using Termius (or JuiceSSH) as the client. It's terrific for making high latency connections feel like a normal one, roaming between WiFi, cellular, and different VPNs without skipping a beat. Even in 2025 it is very useful.
- donatj 1y agoEternal Terminal is just… better
- pss314 1y agoMosh is really great. When working on remote servers, I combine it with tmux. Note: Mosh does not natively support agent forwarding similar to ssh. Creator of Mosh explained why in this comment https://github.com/mobile-shell/mosh/issues/120#issuecomment-418008147 https://github.com/mobile-shell/mosh/issues/120#issuecomment...
- siraben 1y agoI often use jump hosts in SSH, but is the only way to do this in mosh to mosh into the relay and then mosh again?
- ertu5tzzc 1y ago[dead]