Mosh, the Mobile Shell

August 5th 2015

Last week I decided to try mosh, the mobile shell. I was looking to solve something that I found annoying.

My internet connection is inconsistent, so when I'm using mutt, say, to check email, say, over SSH I'll be mid-way through responding to a message when the connection drops. Or, I'm using Profanity (an XMPP-based chat client) and don't know whether the message I sent was received, nor whether I've received the whole message that was sent this direction. That was the pain point. While reviewing Git reset docs, I ran across a developer who linked to another developer who'd written a piece on Mosh.

With mosh, I know when the connection lags because it alerts me to the fact. I also know when a message has been sent over the UDP connection and when it has not (while I'm typing and it's not yet sent, the words are underlined; once sent, the underlines disappear). It's not all that different than SSH in terms of usability, and to start using it it's

    mosh username at yourdomainname.com

the same way you'd log into your server.

Upon entering the mobile shell, things look the same as SSHing in, and

    tmux attach

reconnects you to an always-live Profanity session (if you do indeed have an always-live XMPP-based chat session, and if you detach correctly, with...

    ctrl b

    d

every time. If you're already a Pacman -Syu'er, it's

    sudo pacman -Syu mosh

away.

As we say in Español, chido.

Distributed Git→

← Sent from the Command Line

email · 2019