Mosh (mobile shell) replaces the SSH transport layer with a UDP-based protocol that handles packet loss and network changes gracefully. When your Android device switches from Wi-Fi to LTE — or your connection drops briefly — a Mosh session resumes where it left off without any reconnection prompt. Chuchu usesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jossephus/chuchu/llms.txt
Use this file to discover all available pages before exploring further.
Transport.Mosh to bootstrap a Mosh session automatically: it connects over SSH, starts mosh-server, parses the connection handshake, then hands off to the native Mosh client.
Prerequisites
mosh-server must be installed on the remote host. On most Linux distributions:
How the Mosh bootstrap works
When you connect withTransport.Mosh, Chuchu performs a two-phase setup:
-
SSH bootstrap — Chuchu opens a standard SSH connection to your server using the auth method you configured (password or key). This is the same libssh2 path used by
Transport.SSH. -
Start mosh-server — Chuchu sends the following command over the SSH shell:
-
Parse the handshake — The server responds with a line like
MOSH CONNECT <port> <key>. Chuchu’sMoshBootstrapParserextracts the UDP port and 22-character session key from that output. - Switch to Mosh — Chuchu closes the SSH connection and starts the native Mosh client, connecting to the server over UDP using the port and key from step 3.
- Mosh takes over — The Mosh client handles all subsequent reconnection transparently at the protocol level.
Add a Mosh server
Install mosh-server on the remote host
Run
apt install mosh (or the equivalent for your OS) on the server you want to connect to.Configure authentication
Choose Password or Key authentication — Mosh uses the same auth methods as SSH for the bootstrap phase. Fill in the password or select an SSH key.
Mosh uses UDP for its transport, typically on port 60001 and above. Make sure your server’s firewall allows inbound UDP traffic on those ports. If
mosh-server isn’t found on the remote host, Chuchu will show a bootstrap error rather than opening a session.