Mosh, short for “mobile shell,” changes how remote sessions feel. It keeps a persistent, intelligent connection between client and server. Instead of waiting for every round trip to render text, Mosh predicts, updates, and reconciles on the fly. The result: real-time feedback even on high-latency, unstable connections.
The Mosh feedback loop is the cycle of prediction, correction, and seamless redrawing. Each keystroke sends a lightweight diff to the server. Mosh renders the result instantly on the client. When the server confirms or corrects the state, the client reconciles it without freezing. This loop runs continuously, hiding network delay and removing the perception of lag.
Unlike SSH, Mosh does not tie display updates to TCP’s exact packet delivery. It uses UDP for faster, stateless packets and its own protocol for consistent reconnection. Drop the network, switch to a hotspot, roam between Wi-Fi networks — the feedback loop keeps going. No manual reconnection. No broken session.