5 ms·
The title “Mosh: SSH for 2012” is amusing because now in 2021, ssh is still king.
by foxpurple 5y ago
The title “Mosh: SSH for 2012” is amusing because now in 2021, ssh is still king.
- blfr 5y agoSSH is great and full-featured, and mosh uses it for the initial connection, but try mosh if you haven't. I did years ago and never looked back. It reconnects immediately over any connection and works so well you can miss 15% packet loss. SSH feels so brittle next to it.
- input_sh 5y agoI disagree. SSH is fine for short connections (like git push or running some Ansible playbook), but it's far too fragile for longer uses. For example, if you're running something like dd with no output, you end up in a situation where you're not sure if dd is still running or did your connection just break. With mosh, I could start dd, close my laptop, move to a cafe, open up my laptop, and know for certain I'll re-establish the connection when I'm back online.
- gsich 5y agoIf you have long running operations you can use screen/tmux.
- Shish2k 5y agoYou can use screen/tmux, but they’re both more complicated and less good when it comes to this specific use-case. Personally I use both - mosh (or et) for the seamless automatic-reconnect, and tmux as a console window-manager.
- binkHN 5y ago> You can use screen/tmux, but they’re both more complicated... In what way are they more complicated? Granted screen is legacy, but tmux is just an executable on the server with sane defaults that Just Works OOTB.
- Shish2k 5y ago> In what way are they more complicated? When you change wifi networks you either have to remember to manually disconnect in advance, or wait for ssh to time-out the connection, then you have to create a new ssh connection, then you have to run an extra command to re-attach to the {screen/tmux} session you started earlier. It’s not insurmountably difficult work - but for the specific use-case of roaming across wifi networks, “doing a small disconnect and reconnect dance” with tmux is way more complicated and annoying than “open your laptop and all your connections are still working” with mosh.
- gsich 5y agoWhat? Instead of ./command you type screen ./command.
- flyinghamster 5y agoIn general, I prefer SSH when using reliable, low-latency links, mainly because of the various forwarding capabilities (agent, X11, ports), and sometimes because I need my output to be sequential. But for any kind of situation where the link might be dodgy, mosh is king.
- eminence32 5y agoIndeed, a common paradigm is to use mosh to connect over the internet to some bastion host, and then use ssh for all subsequent connections over a highly reliable internal network.