Musht is a simple wrapper for the mosh client written in rust. Its main goal is to provide support for loading port information from dns records, but also features a few other tweaks. Musht does not need to be installed on the server, and will work just fine with a standard mosh install, but to take full advantage of it's features you will need a domain and the ability to configure dns records.
-
Resolve ports from txt records, allowing both ssh ports and mosh ports to be stored in the domain
-
allow ssh ports to be passed with [user]@host:[port] syntax instead of requiring ssh ports to be passed as an ssh argument
-
fallback to ssh if server doesn't have/can't start mosh
-
if tmux is installed and configured, automatically enable support for scrolling / history
At this time, no prebuilt binaries are published, so you'll need to compile them yourself.
First, make sure you have rust installed. The recommended way to this is through rustup, but there are alternate ways if you would like better integration with your package manager.
You will also need to make sure you've added $HOME/.cargo/bin to your path.
Musht also requires mosh to run, so make sure you have it installed.
From here there are two installation methods. If you're not sure which one to pick, follow the install script method.
-
clone the repository
git clone https://github.com/elliotnash/musht.git
-
enter musht directory
cd musht
-
make install script executable
chmod 777 *install.sh
-
run install
./install.sh
the install script edits your .bashrc or .zshrc, so if you would like complete control over the installation, follow this
-
clone the repository
git clone https://github.com/elliotnash/musht.git
-
enter musht directory
cd musht
-
build and install binary to ~/.cargo/bin
cargo install --force --path .
-
to enable completions, setup
complete -C __musht_completions musht
to be run each time your shell starts (etc in your .bashrc or .zshrc)
To take adventage of musht's dns resolving, you'll need to have a record like an a, aaaa, or cname pointing to your servers ip, and you'll also need a txt record with the same name with a value like this, replacing the ports with the ports you want mosh to use.
{"ssh_port": "22", "mosh_ports": "60000:61000"}
ssh_port must be a single port, wheras mosh_ports should be a port range. mosh_ports can be set to a single port, but it is highly discouraged as each mosh connection runs on a seperate port, and a single port would only allow one simultaneous connection
run ./uninstall.sh
from the git directory
Musht is licensed under GPL-3.0, see LICENSE