HNHacker News
TopNewBestAskShowJobs

Arunjay__

13 karma · joined July 28, 2025

submissionscomments
Arunjay__··on Show HN: Mosh-rs, Mosh rewritten in Rust with scrollback and Windows support
You were right above. I just tested it. Mosh sets the -S flag as none by default on ssh and disables controlmaster. If you use --experimental-remote-ip=remote u can ask the server for an address and the controlmaster config will work.

If the host is behind a NAT then use =local instead of =remote.

im also currently making it so mosh-rs prints a hint when it sees a ControlMaster socket the default mode is about to bypass. should be out soon.

Arunjay__··on Show HN: Mosh-rs, Mosh rewritten in Rust with scrollback and Windows support
Its a file by file rewrite. Please let me know if you find any file which is not.
Arunjay__··on Show HN: Mosh-rs, Mosh rewritten in Rust with scrollback and Windows support
You can get most of what you want today without a protocol change. mosh only uses ssh for the initial hop, and it just runs whatever ssh is on your PATH, so your ~/.ssh/config applies. Put a ControlMaster/ControlPersist entry in there and only the first tab actually authenticates. Every tab after that reuses the socket, and the "ssh host mosh-server new" step is quick. Each tab still ends up with its own UDP connection, but that's one tiny server process and one key per tab, not a new login.

Sharing one SSP connection across several terminals is a big protocol change, and I'm deliberately keeping mosh-rs wire-compatible with upstream, so I don't want to go off on my own there. For "lots of tabs, one connection" the thing that works well is one mosh session into tmux, and tmux control mode (tmux -CC) if your terminal supports it. That gives you native tabs over a single mosh link, which is about as close to ControlMaster as you can get with mosh's design.

Arunjay__··on Show HN: Mosh-rs, Mosh rewritten in Rust with scrollback and Windows support
mosh-rs is a Rust port of mosh, the mobile shell. It speaks the same wire protocol, so the client works against the mosh-server already installed on your hosts, and the server works with the stock mosh client.

In Mosh, there is no native Windows client (you run it inside WSL), and there is no scrollback, which is the most-upvoted open issue on the project since 2012. mosh-rs has both.

I would especially like to hear from people who use mosh over bad links or on Windows. Any feedback/testing is appreciated

https://github.com/Arunjay4213/mosh-rs