Ssh – Does mosh save bandwidth

bandwidthmoshssh

The mobile shell claims many benefits, especially with mobile connections. Many mobile plan prices scale with the amount of data transferred. So I wonder whether I can use Mosh to cut down in data usage. A tutorial on DigitalOcean states that

Mosh […] will only communicate changes to the currently visible screen area. This allows it to radically reduce the bandwidth […]

But does not give any statistics on how much bandwidth is gained and whether this really weighs out the additional overhead of establishing and maintaining a connection via UDP.

Are there any tests, experiences that compare SSH to Mosh in real-world-scenarios, especially

  • used with screen or tmux,
  • on a mobile connection while moving between different connection modes or cell towers,
  • for long-lived sessions?

Best Answer

Mosh will probably increase your data usage. It is designed to increase reliability and responsiveness, or at least the illusion of it.

From this discussion, we know that mosh's predictive capabilities actually causes an extra packet being sent per keystroke. If you are concerned about metered data usage, you might want to use the lowbandwidth branch of mosh.