Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Love mosh, back when the connection was bad I had it aliased to ssh. Somewhat relevant: if you actually a need to take your shell mobile, check out my tmux plugin that allows you to quickly transfer your tmux session to your phone without any app, using websockets and a QR code: https://github.com/bjesus/muxile


sort by: page size:

I mostly use mosh from my mobile for connections to home. It handles session persistence nicely even while on the move.

It'd be great if I could use it now while working from home because my ssh sessions keep dying. Unfortunately the work firewall won't allow this. So tmux to preserve the sessions is the best I can do.


If you’re using tmux, mosh doesn’t bring much to the table compared to plain SSH. Tmux will keep everything running and you can easily reattach to that session after a reconnect.

Apps like ShellFish even do this completely transparently so you don’t even notice you got disconnected for a second. No need for mosh there.


Mosh is an essential requirement for any kind of mobile work over ssh, combine it with tmux and iTerm2 tmux integration and you can work on a remote server without even knowing it :D

SSH fares poorly on mobile connections if you're traveling due to IPv4 roaming. Mosh solves that issue.

Plug for mosh, the mobile shell. If you can ssh, you can probably mosh. https://mosh.org/

mosh isn't an alternative shell, it's sort of like "rsh" or "ssh" except designed for mobile... and using SSH for authentication and session setup.

Mosh also makes it possible to have an ssh client running on a mobile device and still use the mobile device as a mobile.

Mosh is really great for avoiding disconnections and local echo. Lack of SSH agent forwarding was a problem for me as well, but I have found a workaround - I open a separate plain 'ssh -A' connection at the same time when I need my keys. On target machines I have SSH_AUTH_SOCK pointing to the stable well known location, which is a symlink to the unix socket recreated always by the last 'ssh -A' connection on the server. This allows me to use ssh from tmux session connected using mosh.

have you tried Mobaxterm for this? I've not used its mosh support but like it as a general SSH client...

Mosh is great, but I kind of stopped using it once I discovered Tmux so I could resume a session if the connection dropped.

It's not that Mosh does anything wrong, but SSH has more features, and is supported by basically everything ever. Consequently, I stick with old-school SSH.


Pretty sure that mosh uses ssh initially and then the communication is over udp. Not sure if an ssh connection is even maintained then. Tmux I guess you would run locally and put in the background when you want to work on something else. But then your ssh connection could still drop or tmux could crash on your local machine.

Trying to use SSH via LTE over a mobile phone hotspot was downright horrible. It took ridiculous keepalive settings and a separate window pinging the destination to make it even halfway usable.

Then someone on another HN thread mentioned mosh. That was just what the doctor ordered. It's something I've wished I knew about years ago, given that it's also useful when Wi-Fi gets dodgy.


You should try tmux over ssh over mosh. Your session lives on thanks to tmux. And mosh reconnects you automatically, even when your IP address changes ;-)

Well, on port fwd, maybe if you forward the mosh server port would work. If you use SSH itself as a tunnel, the setup it's far complex, as mosh is just a remote shell.

Still, mosh curb-stomps ssh on latency, input guesssing, data saving and bandwith usage.

Using that over 2G was a literal black/white difference compared to SSH which was nearly impossible to connect and the latency was unbearable. Under mosh I could chat, email, nntp (they still are some good newsgroups), IM over jabber/telegram, read news over RSS, code in C/TCL (jimsh) and read the docs with links, among reading books (novels and essays) with some CLI epub reading script.

Yes, I also used tmux on the remote machine too, mosh+tmux work great with each other. Albeit mosh resumes a potentially lost/dropped connection just fine (even without a running remote tmux/screen), I think tmux itself would send less data over the wire.


I just learned about mosh, ty. I use SSH sessions all the time and sometimes over satellite links.

Living permanently on 4G I couldn't get by without mosh. I have managed to do weeks of work with most+tmux+vim at times when ssh was too painful to use.

My number one use case is tethered mobile phone on a train. For everthing else I just use vanilla ssh and screen. You are right that if you just need mobility between office1, office2, coffeeshop, and home ssh with screen is probably all you really need.

I don't think mosh's developers really promote it as anything more than an experiment on improving shell connections on a high packet loss high latency mobile data plan.


Mosh is closer to tmux than to ssh.

I found mosh to be a huge improvement over standard SSH when connecting over roaming/unreliable/high latency networks.
next

Legal | privacy