Also known as Mobile shell
tool used to connect from a client computer to a server over the Internet, to run a remote terminal
Mosh is a remote terminal application that supports intermittent connectivity, allows roaming, and provides speculative local echo and line editing of user keystrokes. Mosh keeps the session alive if the client goes to sleep and wakes up later, or temporarily loses its Internet connection. Mosh allows the client and server to "roam" and change IP addresses, while keeping the connection alive. Unlike SSH, Mosh can be used while switching between Wi-Fi networks or from Wi-Fi to cellular data to wired Ethernet. The Mosh client runs a predictive model of the server's behavior in the background and tries to guess intelligently how each keystroke will affect the screen state. When it is confident in its predictions, it will show them to the user while waiting for confirmation from the server. Most typing and uses of the left- and right-arrow keys can be echoed immediately. As a result, Mosh is usable on high-latency links, e.g. on a cellular data connection or spotty Wi-Fi. In distinction from previous attempts at local echo modes in other protocols, Mosh works properly with full-screen applications such as emacs, vi, alpine, and irssi, and automatically recovers from occasional prediction errors within an RTT. On high-latency links, Mosh underlines its predictions while they are outstanding and removes the underline when they are confirmed by the server. Mosh does not support X forwarding or the non-interactive uses of SSH, including port forwarding. Mosh warns the user when it has not heard from the server in a while. Mosh supports lossy links that lose a significant fraction of their packets. Mosh handles some Unicode edge cases better than SSH and existing terminal emulators by themselves, but requires a UTF-8 environment to run. Mosh leverages SSH to set up the connection and authenticate users. Mosh does not contain any privileged (root) code. The Mosh web site has information about packages for many operating systems, as well as instructions for building from source. The mosh-client binary must exist on the user's machine, and the mosh-server binary on the remote host. If the mosh-client or mosh-server binaries live outside the user's $PATH , mosh accepts the arguments --client=PATH and --server=PATH to select alternate locations. More options are documented in the mosh(1) manual page. From this point, mosh runs the mosh-server process (as the user) on the server machine. The server process listens on a high UDP port and sends its port number and an AES-128 secret key back to the client over SSH. The SSH connection is then shut down and the terminal session begins over UDP. To function, Mosh requires UDP datagrams to be passed between client and server. By default, mosh uses a port number between 60000 and 61000, but the user can select a particular port with the -p option. Please note that the -p option has no effect on the port used by SSH. Our Debian and Fedora packaging presents Mosh as a single package. Mosh has a Perl dependency that is only required for client use. For some platforms, it may make sense to have separate mosh-server and mosh-client packages to allow mosh-server usage without Perl. Mosh supports producing code coverage reports by tests, but this feature is disabled by default. To enable it, make sure lcov is installed on your system. Then, configure and run tests: This will run all tests and produce a coverage report in HTML form that can be opened with your favorite browser. Ideally, newly added code should strive for 90% (or better) incremental test coverage.
Excerpt from the source-code README · 7,989 chars · not written by Vinony
via Wikidata · CC0
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).