
M
Mosh-rs
Open Sourceπ Alt to MoshModern mobile shell rewritten in Rust with Windows and scrollback support
π³ Self-Hostableπ No Sign-upβ‘ Editorial Signal: 77/100β
34 Stars
cargo install mosh-rsMosh-rs is a Rust rewrite of the popular Mobile Shell protocol that modernizes remote terminal sessions by adding native Windows compatibility and proper scrollback history. It solves the classic SSH drop-out and sluggish lag issues over unstable networks while fixing long-standing Mosh feature gaps.
Memory-safe, high-performance implementation built entirely in Rust.
Brings reliable mobile shell capabilities natively to Windows client and server environments.
Fixes the frustrating missing scrollback buffer limitation of the original Mosh protocol.
Maintaining persistent remote development sessions over unstable Wi-Fi or cellular connections
Connecting securely from a Windows local machine to remote Linux infrastructure without dropouts
Executing long-running terminal tasks without losing context or history upon network disconnection
Unlike the original C++ Mosh which lacks native Windows support and famously drops scrollback history, Mosh-rs addresses these exact pain points while leveraging Rust for safety.
Developers, sysadmins, and power users who frequently switch networks or use Windows and need rock-solid persistent terminal connections.
Mosh-rs is engineered to eliminate critical operational friction in devtools & cli. From an architectural standpoint, the system adopts a local-first, self-contained deployment posture, ensuring streamlined onboarding and minimal setup overhead.
Because the underlying code is fully open-source, engineering teams can audit security implementations, inspect telemetry vectors, and extend functionality via custom fork without risk of sudden vendor deprecation.
Mosh-rs is an authoritative, clean-room rewrite of MIT's Mobile Shell protocol implemented entirely in safe, concurrent Rust by systems developer Arunjay. Preserving strict wire-protocol compatibility with upstream C++ Mosh implementations, Mosh-rs operates over the State Synchronization Protocol (SSP) encapsulated within encrypted UDP datagrams. Unlike traditional SSH sessions that depend on fragile, connection-oriented TCP streams, Mosh-rs treats remote terminal rendering as an eventual consistency synchronization problem. Ephemeral terminal state changes are continuously diffed using cryptographic framing secured by AES-128 in OCB mode, allowing seamless roaming across dynamic IP transitions and erratic packet loss conditions. Built upon the Tokio asynchronous runtime, Mosh-rs introduces a revolutionary architectural enhancement: full terminal scrollback buffer preservation. While upstream Mosh famously discards off-screen lines due to strict frame diffing, Mosh-rs implements server-side history tracking that intercepts rows departing the active screen matrix and transmits them via extended protocol state fields. Furthermore, Mosh-rs integrates native Windows ConPTY pseudoconsole subsystem abstractions, completely eliminating historic dependencies on WSL, Cygwin, or MSYS2 emulation layers for Windows client and host environments, while maintaining strict non-blocking asynchronous event loops across platform networking primitives.
Mosh-rs offers impeccable developer ergonomics, serving as an immediate drop-in replacement for standard `mosh` and `ssh` commands across macOS, Linux, and native Windows terminals. Developers initiate sessions using familiar syntax, such as `mosh-rs user@hostname`, with support for standard command-line flags including `-p` for UDP port selection, `--ssh` for custom SSH bootstrap commands, and `--predict` for client-side local echo tuning. On Windows, Mosh-rs integrates flawlessly with Windows Terminal and PowerShell, delivering smooth mouse-wheel scrollback, full color rendering, and native font glyph support out of the box. The local speculative execution model predicts keystroke outcomes instantly, eliminating typing latency over cellular and transatlantic connections while providing subtle visual underlining until server confirmation arrives. Operational telemetry is driven by Rust's `tracing` ecosystem; developers can enable granular debug logs by setting the `RUST_LOG=mosh=debug` environment variable, producing structured JSON outputs for connection diagnostics. Error reporting clearly differentiates between initial SSH bootstrapping failures, UDP handshake timeouts, and cryptographic key mismatches, giving developers actionable guidance when troubleshooting restrictive network perimeters, NAT timeouts, intermediate proxy drops, and corporate firewall restrictions across distributed field operations. Built-in diagnostic profiling surfaces real-time round-trip latency statistics and frame drop counters directly in terminal status bars during active sessions.
Mosh-rs is licensed under the GNU General Public License version 3 (GPLv3), maintaining strict philosophical and legal alignment with the original MIT Mobile Shell project. The GPLv3 framework grants comprehensive rights for internal enterprise deployment and individual engineering usage, while requiring that modifications distributed in derived binaries remain open source. In terms of total cost of ownership, Mosh-rs delivers massive productivity dividends for distributed engineering organizations. Eliminating session drops during network handoffsβsuch as commuting between Wi-Fi access points or operating over high-latency satellite linksβsaves countless developer hours previously lost to broken terminal multiplexers and dropped command-line workflows. From a compute infrastructure perspective, Mosh-rs imposes negligible resource overhead. The server daemon compiles to a lean static binary with an idle resident set size (RSS) between 15MB and 25MB, consuming virtually zero CPU cycles when terminal state is static. Unlike commercial remote access SaaS vendors that levy per-user monthly subscription fees, Mosh-rs is entirely free and self-hostable, containing zero telemetry phone-home trackers, proprietary licensing locks, hidden seat quotas, or vendor lock-in vectors across all supported enterprise operating systems. Because client-server state diffing transmits only visual delta updates rather than continuous raw character streams, network bandwidth consumption drops dramatically over congested cellular links.
From an infrastructure architecture perspective, Mosh-rs is fully recommended for production deployment across heterogeneous engineering teams, remote operations staff, and cloud infrastructure maintainers who require resilient terminal connectivity. Its ability to maintain persistent terminal sessions across IP changes, combined with native Windows ConPTY integration and restored scrollback navigation, makes it clearly superior to legacy C++ Mosh. The wire compatibility ensures seamless interoperability with existing Linux `mosh-server` packages installed across enterprise cloud infrastructure. However, systems administrators must navigate specific operational constraints before rollout. Corporate firewall perimeters that aggressively filter UDP traffic or block UDP port ranges (typically ports 60000 through 61000) will prevent Mosh-rs sessions from establishing after initial SSH authentication. For enterprise deployments, automate installation via `cargo install mosh-rs` or package managers like Homebrew and Winget. Configure host firewalls with iptables or AWS Security Groups to allow dynamic UDP traffic on designated ranges, and integrate Mosh-rs with SSH jump hosts using standard ProxyJump directives in local `~/.ssh/config` files to maintain strict zero-trust boundary controls across internal bastion architectures and audit bastions. Additionally, ensure UDP port forwarding is correctly configured on NAT routers, and employ tmux or screen sessions on the remote host as an additional resiliency layer for mission-critical jobs.
Mosh-rs is 100% free and open-source under an open software license. There are no mandatory monthly subscription fees to access the source code or run it locally.
Unlike the original C++ Mosh which lacks native Windows support and famously drops scrollback history, Mosh-rs addresses these exact pain points while leveraging Rust for safety.
Yes. Mosh-rs is designed for self-hosting via Docker or direct server deployment. Running on your own infrastructure allows you to maintain direct control over your local compute, database storage, and operational environment.
No account creation or credit card is required to evaluate Mosh-rs. You can immediately access core features or run it locally without onboarding friction.
You can launch or test Mosh-rs quickly using the following command: cargo install mosh-rs Visit the official portal at https://github.com/Arunjay4213/mosh-rs for documentation and guides.
ToolsRadar maintains strict editorial independence. This review of Mosh-rs was conducted using our standardized 5-pillar evaluation framework (Setup, Code Auditability, Maintenance Vitality, Cost Advantage, and Community Signal). We do not accept paid placements to inflate benchmark scores.
Maintainers of Mosh-rs and community advocates can display this real-time verification badge in your GitHub README, official documentation, or landing page.
[](https://lordorange.top/tool/mosh-rs)<a href="https://lordorange.top/tool/mosh-rs" target="_blank"><img src="https://lordorange.top/badge/mosh-rs.svg" alt="Featured on ToolsRadar" /></a>Compare other trending developer tools and open-source projects in this space.
Cross-referenced architectural playbooks and category rankings featuring Mosh-rs.
High-signal, production-tested utilities with transparent codebases and active communities.
Take back data ownership by replacing expensive monthly cloud subscriptions with self-hosted software.
The definitive guide to escaping SaaS subscription sprawl with Coolify, Traefik, Tailscale, and automated S3 backup pipelines.
Replace sluggish 1970s Unix utilities with blisteringly fast, memory-safe Rust and Go modern CLI powerhouses.