4 ms·
I 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
by input_sh 5y ago
I 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.