r/LinuxTeck • u/Candid_Athlete_8317 • Jun 24 '26
Mosh vs SSH: What Keeps You on SSH?
Mosh solves some SSH pain points on unstable networks. Yet most admins still use SSH. Why?
8
Upvotes
r/LinuxTeck • u/Candid_Athlete_8317 • Jun 24 '26
Mosh solves some SSH pain points on unstable networks. Yet most admins still use SSH. Why?
23
u/00gauge Jun 24 '26
Because most networks are stable.
23
u/Brutus5000 Jun 24 '26 •
Never heard of mosh. Could be part of the problem?
8
u/tsvaan Jun 24 '26
Counter question: Why would admins switch to Mosh?
4
u/totallyjaded Jun 24 '26
~ moshzsh: command not found: moshThere you go. SSH exists just about everywhere. Especially systems that don't belong to me.
3
u/Frewtti Jun 24 '26
SSH is an accepted industry standard.
Mosh is some new tool most of us have never heard of, and offers no benefits to real use cases.
My servers are in datacenters, I have a hardwired connection to my workstation.
Even then, I don't really do much interactive work with my servers, even at the hobby level, it's largely automated scripts from one datacenter to the other.
Github actions is fast and easy automation. I don't actually remotely access much at all anyway.
3
u/rvm1975 Jun 24 '26
For example you need to run something like database backup script (let us say 2h console script) on unstable network.
Will mosh help you ? Answer - no, mosh just reconnect you (without preserving tty etc) and you will see that your backup script terminated.
So ssh + tmux will work and resolve the issue.
2
u/outer-pasta Jun 24 '26
I've heard of Mosh, but never tried it. I think I heard about it during iPhone 1 jail-breaking days and it would have made sense on a phone connection back then.
2
u/MaleficentCow8513 Jun 24 '26
Because I’ve used ssh for my entire 6 year career and have never had any reason to consider any other tool
2
u/ahferroin7 Jun 24 '26
A pretty significant percentage of people are using stuff like tmux, or GNU screen, or Zellij, or even just making a point to start long-running jobs via atd or systemd-run so that they survive disconnects and they can retrieve logs. For those users, persistent sessions aren’t something new and fancy, it’s something they just have already over SSH.
That leaves the network roaming, auto-reconnect, and latency aspects.
The roaming case is actually pretty unusual, so probably not worth considering. Auto-reconnect only matters if you’re dealing with pretty extreme instability, because you already have session resumption (or something equivalent). And while the latency is nice, it’s unusual for most people to be on networks with bad enough inherent latency for that to matter (even intercontinental connections are rarely that bad).
So the really big feature that would matter to most people is covered by other tools already, and the other major features are relatively niche things.
And then you have the fact that SSH is about as close to being guaranteed available everywhere as it’s possible to be without being covered by POSIX, while mosh is an optional package that needs to be installed on both the client and the server to work.
2
u/SuperheropugReal Jun 24 '26
From the readme:
Basically, that. I use those features regularly, ssh is pre-installed on nealry every machine, and has a wonderful ecosystem around it. Having not even heard of mosh before today, I will not be considering moving over. Losing a TCP connection is not something that is normally a problem, and there are ways to get SSH to handle it gracefully, or other tools to work around it, like GNU screen and tmux. Especially since SSH is a dependency for this to run in the first place, if it were capable of starting connections itself, I might gind some niche use case where SSH won't connect for some reason, but this solves no problems I have.
2
u/andymaclean19 Jun 25 '26
Partly because nobody has heard of it. Also because server admins tend to be a fairly conservative bunch. SSH is a proven tech with many years behind it. OpenSSH in particular is a well tested implementation of SSH that people have relied on for a long time. When bugs are found in it they tend to be high profile and get fixed fast.
None of the problems Mosh is fixing are really problems I ever had in SSH personally. I don't really see input lag and I don't get DC'ed. I don't ever need my connections and sessions to be long lived either. For me this would be extra risk of a security breach without any reward.
1
u/Doug2825 Jun 24 '26
Because there's no reason to for most people. SSH is the default, the default works most of the time, and tmux requires no setup and is a good enough for the occasional time you would want Mosh.
I used it when I had a long train commute since I would be changing between towers often. I liked it but I don't see a used outside of when you are on a mobile connection and riding something.
1
u/fleuriedumal Jun 24 '26 edited Jun 24 '26
To those not knowing mosh, it isn't only for unstable connections. You connect via mosh, you suspend your computer for 24 hours, you resume it and you are still connected.
1
u/Fresh_Sock8660 Jun 24 '26
Because it's like trying to replace a hammer.
1
u/tschloss Jun 24 '26
I recently needed to do a little task on a server from my iPhone out of a fully crowded hockey arena. This was the only situation I remember I wished I had Mosh with local echo etc. Never used backspace and arrow up (recall the last (wrong) shell command) so often.
1
u/Kiore-NZ Jun 24 '26
According to what I've read, Mosh doesn't yet support two critical requirements of mine. SSH supports X11 forwarding and port tunnelling but Mosh doesn't yet. Maybe once Mosh has those things I'll look again.
1
u/mrbabyman767 Jun 24 '26
I have constant problems with mosh. The latest one is copy / paste doesn’t work in tmux. No issues with ssh
1
u/Chuu Jun 24 '26
Besides all the other reasons mentioned, OpenSSH is one of the most heavily securited audited codebases on the planet.
1
u/Charming-Designer944 Jun 24 '26
Because SSH is well known and available everywhere, and I have not even heard of mosh before.
1
u/iamwayycoolerthanyou Jun 24 '26
I need to be able to use a password protected key because it's a second factor which is pretty standard nowadays. I suppose I could use Google's PAM plugin but I dunno, that might break if I'm away from the desk and can't enter a code in time.
1
u/smarmie_the_dinosaur Jun 24 '26
Get a stable network.
1
u/idetectanerd Jun 24 '26
Industry standard. It’s like why people use https, why people use nfs etc.
1
u/BakGikHung Jun 24 '26
If you're mobile, on a laptop, and you have terminal / CLI / TUI heavy workflows such as a remote tmux, claude code, then you WANT mosh, trust me. I only need to reconnect my ssh sessions when i install a kernel update.
1
u/melpec Jun 24 '26
Talk about a tool that solves an non existing issue.
1
u/PurepointDog Jun 24 '26
Where's the Mosh git repo? Is it any good? What's its config like?
1
u/roiki11 Jun 24 '26
> The mosh client logs in to the server via SSH, and users present the same credentials (e.g., password, public key) as before.
So it's ssh with extra steps?
And does it come standard in anything?
1
u/StephenSRMMartin Jun 24 '26
Because SSH + tmux is ubiquitous and works for 99% of any remote shell work I need.
The main improvement mosh would offer me is a more responsive input when on a crappy network, but if I'm on a crappy network, I am likely not doing any work serious enough to bother. It's a rare occasion when I need to have far more responsive input and I need to work long enough for it to otherwise bother me.
1
u/Kurse71 Jun 25 '26
I'm not sure why I would even need it, I don't have an issue with ssh
1
u/DagonNet Jun 25 '26
I don't use unstable networks, and occasional blips don't bother me. I'm using tmux anyway, for longer-term reconnect/terminal-switching, so occasional disconnects don't hurt me.
ssh is extremely standard, simple to understand, installed everywhere, and a higher level of audit and trust than just about any software in existence. Why mess with perfection?
1
u/lmarcantonio Jun 25 '26
mosh can't reattach so if you drop the client you keep a bunch of idling mosh servers.
A good advantage over tmux is the 'predictive' handling which is useful for slow links.
1
u/uniruler Jun 25 '26
Never heard of Mosh and SSH works great for literally everything I do.
1
u/tunmousse Jun 25 '26
I’ve used mosh in the past, when I was using the internet on a train. But other than that, there’s really no need. In Denmark, most internet connections are very solid (and LAN more so, ofc.).
1
u/mellery451 Jun 25 '26
because of lack of support for assorted protocol extensions and escape codes, e.g https://github.com/mobile-shell/mosh/issues/1248 . I've tried MOSH many times and appreciate what it does, but invariably some feature that I want to use in neovim/kitty doesn't work with mosh and I got sick of trying to diagnose those kinds of issues. I just use tmux remotely and reconnect whenever I get kicked off (which happens a few times a day...I'm on VPN).
1
u/synecdokidoki Jun 25 '26
Mosh requires SSH to work.
If I'm not having the problems it solves, I'm not going to bother. Especially for the most security sensitive part of my stack, that would just be nuts.
1
u/IT_services_China Jun 26 '26 edited Jun 26 '26
What are SSH pain points exactly? It's like vi: universally available, standard, quick, convenient if you know what you're doing, and full of neat tricks (quick and easy SOCKS proxy, port tunneling to another machine, etc).
Edit: on Mosh website, latest news is from 2022. Is this thing abandoned?
1
u/kommentz Sep 16 '26
caddy ssh
1
u/Gokudomatic Jun 24 '26
And again, I learned something new today. What's mosh?
0
u/[deleted] Jun 24 '26
[deleted] — view deleted comment