mosh icon

mosh

Mosh is a robust mobile shell that significantly enhances the remote terminal experience, especially over unstable connections. It acts as a drop-in replacement for SSH, offering seamless roaming, intelligent local echo, and automatic reconnection. Developed by Mosh development at MIT

License: Open Source
Available for:
Mac OS X Linux

About mosh

Mosh revolutionizes remote terminal sessions, particularly in challenging network environments. Unlike traditional SSH which can freeze or disconnect frequently when your network fluctuates, Mosh is built with connection resilience in mind. This is achieved through its innovative State Synchronization Protocol (SSP).

Key benefits and features include:

  • Seamless Roaming: Mosh allows you to switch between network connections (like Wi-Fi to cellular) without dropping your terminal session. This is invaluable for mobile users who are frequently on the go.
  • Intelligent Local Echo: Commands you type are echoed immediately on your local machine, reducing the perceived latency and making the shell feel much more responsive, even on high-latency connections. This prediction engine minimizes the frustration of waiting for characters to appear.
  • Automatic Reconnection: If your connection briefly drops, Mosh attempts to automatically reconnect in the background, picking up exactly where you left off. This eliminates the need to constantly re-establish your SSH connection manually.
  • Reduced Bandwidth Usage: Mosh sends only the necessary screen updates, which can significantly reduce bandwidth consumption compared to SSH, especially for visually complex output.
  • UTF-8 Support: Mosh fully supports UTF-8 characters, ensuring compatibility with a wide range of languages and special characters in your terminal.
  • Security: Mosh utilizes SSH for initial authentication, inheriting its robust security features. The session data is then encrypted for further protection.

Mosh is an open-source project that is widely available across various platforms, including Linux, macOS, BSD, and even some mobile operating systems with third-party clients. It integrates smoothly with existing SSH configurations for authentication, making the transition straightforward for most users.

Pros & Cons

Pros

  • Maintains connection over unstable networks, preventing session drops.
  • Allows seamless roaming between different network connections.
  • Provides a highly responsive typing experience with intelligent local echo.
  • Automatically reconnects after brief network outages.
  • Reduces bandwidth usage compared to standard SSH in some scenarios.

Cons

  • Does not support SSH features like X forwarding or arbitrary TCP port forwarding.
  • File transfer requires separate tools (scp, sftp).

What Makes mosh Stand Out

Mobile Shell Optimization

Specifically designed to provide a superior terminal experience on mobile connections with high latency and intermittent connectivity.

Seamless Roaming Across Networks

Allows users to move between different network types (Wi-Fi, cellular) without losing their terminal session.

Resilience to Network Fluctuations

Maintains the session even during brief network outages or changes, automatically reconnecting.

Highly Responsive Typing

Intelligent local echo provides immediate visual feedback for keystrokes, making the shell feel faster.

What can mosh do?

Review

Mosh: A Review of the Mobile Shell

Mosh presents itself as an alternative to the ubiquitous SSH for remote shell access, specifically targeting the challenges posed by mobile and unstable network connections. This review examines its core functionalities, performance, and overall value proposition for users requiring resilient remote connectivity.

At its heart, Mosh differentiates itself from SSH through its State Synchronization Protocol (SSP). While SSH maintains a continuous, synchronous connection, susceptible to freezing and disconnections on unstable networks, Mosh operates asynchronously. It synchronizes the state of the terminal between the client and server, allowing for a much more robust and less interruptible experience. This is arguably its most significant advantage, making it a compelling choice for anyone working on a laptop or mobile device with fluctuating network access.

One of Mosh's standout features is its ability to roam seamlessly between networks. Users can switch from a Wi-Fi connection to a cellular data connection, or even to a different Wi-Fi network entirely, without their terminal session dropping. This capability is particularly useful for individuals who are constantly moving or working in environments with inconsistent network coverage. The transition is often imperceptible to the user, allowing for uninterrupted workflow.

The intelligent local echo is another key component of the Mosh experience. When typing commands, Mosh immediately displays the characters on the local screen. While SSH waits for confirmation from the server before displaying characters, which can introduce noticeable lag on high-latency connections, Mosh's predictive echoing significantly reduces the perceived delay. This makes interacting with the remote shell feel much more responsive, improving usability and reducing frustration.

Mosh also incorporates automatic reconnection. Should the network connection briefly drop, Mosh attempts to re-establish the connection in the background. Upon reconnection, the terminal state is synchronized, and the user can continue from where they left off. This capability is a vast improvement over SSH, where a dropped connection typically requires manually initiating a new session and potentially losing unsaved work or terminal history.

From a security perspective, Mosh leverages SSH for the critical initial authentication phase. This means it benefits from SSH's established security protocols, including public key authentication. After authentication, Mosh uses its own encrypted protocol for session data. While this introduces a new protocol, it is designed with security in mind and maintains confidentiality between the client and server.

While Mosh excels in its core area of resilience and mobility, it is important to note its limitations compared to a full SSH implementation. Mosh does not directly support features like X forwarding or arbitrary TCP port forwarding, which are common uses of SSH. File transfer is also not handled directly by Mosh; users typically rely on separate tools like scp or sftp, often over an SSH connection established separately.

Resource usage is generally efficient. Mosh is designed to send only the necessary screen updates, which can result in lower bandwidth consumption than SSH, particularly when dealing with terminal output that involves frequent screen redraws or scrolling. The local echo mechanism also contributes to this efficiency by reducing the amount of data that needs to be sent back and forth for basic typing.

Installation and deployment are relatively straightforward on most platforms. Mosh is available in the package repositories of many Linux distributions and is easily installed on macOS via package managers. Using Mosh requires installing it on both the client and the server. Authentication typically relies on existing SSH configurations, making the transition from SSH relatively smooth for users who are already familiar with key-based authentication.

In conclusion, Mosh is a valuable tool for anyone who needs reliable remote terminal access over less-than-ideal network conditions. Its focus on roaming, automatic reconnection, and intelligent local echo provides a significantly improved experience compared to traditional SSH in mobile or unstable environments. While it doesn't replace all the functionalities of SSH, its strengths in connection resilience make it a highly recommended alternative or complement for users prioritizing uninterrupted sessions and responsive interaction over unreliable networks.

Similar Software

OpenSSH
OpenSSH

OpenSSH is the premier connectivity tool for remote login with the SSH protocol. It encrypts all traffic to eliminate eavesdropping, connection hijacking.

Bitvise SSH Server (WinSSHD)
Bitvise SSH Server (WinSSHD)

Bitvise SSH Server (WinSSHD) is an SSH server.

Screenshots

Help others by voting if you like this software.

Compare with Similar Apps

Select any similar app below to compare it with mosh side by side.

Compare features, pricing, and reviews between these alternatives.

Compare

Compare features, pricing, and reviews between these alternatives.

Compare