> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/use-mosh-in-remote-desktop-manager-through-wsl.md).

# Use Mosh in Remote Desktop Manager through WSL

Mosh is a UDP-based remote shell protocol that utilizes SSH infrastructure for authentication, making it safe to use. It is very useful in scenarios of high latency and bad connectivity, as it will reconnect the session when the connection returns to normal, instead of dropping it.

{% hint style="info" %}
Keep in mind that Mosh will take up about 3 GB of disk space and download a few hundred MB using the internet connection, as it is essentially a second operating system.

PowerShell should be run as an administrator for this solution.
{% endhint %}

### Steps for installing Mosh

1. Open PowerShell.
2. Install WSL2 itself by using the `wsl --install` command.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>WSL should now be available in the start menu. It is possible that a reboot is necessary after this install.</p></div>
3. Install Debian with `wsl --install -d debian`.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>An assistant may ask you to create a user account during the installation. Debian should now be available in the start menu. It is possible that a reboot is necessary after this install.</p></div>
4. Download all available software update by using `wsl sudo apt update`.
5. The WSL image may be outdated and contain outdated software. Input `wsl sudo apt full-upgrade`.
6. Install mosh with `wsl sudo apt install mosh`.

Once Mosh is installed, it can be used with the usual command and adding `wsl` in front (e.g., `wsl mosh user@server.example.com`).

### Mosh integration in Remote Desktop Manager 2023 and later

1. Create a ***Windows Terminal*** entry, which is under ***New entry*** – ***Miscellaneous***.
2. Make certain the ***Display*** option is set to ***Embedded (tabbed)***.
3. Use the above-mentionned `wsl mosh user@server.example.com` command in the ***Run*** field.
4. Click ***OK*** to save and close the window.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Windows 11 users should already have Windows Terminal preinstalled, but Windows 10 users may need to download it through the <a href="https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701">Microsoft Store</a>.</p></div>

### Mosh integration in Remote Desktop Manager 2022 and earlier

Though it is recommended to update to the latest Remote Desktop Manager version, this method can be used as a workaround with Remote Desktop Manager 2022.

1. Create a ***Command Line (External Application)*** entry, which is located under ***New entry*** – ***Miscellaneous***.
2. The ***Display*** option must be set to ***Embedded (tabbed)***.
3. Input **C:\Program Files\WindowsApps\Microsoft.WindowsTerminal\_1.16.10262.0\_x64\_\_8wekyb3d8bbwe\WindowsTerminal.exe** into the ***Run*** field.
4. Input **C:\Windows\system32\wsl.exe -d Debian mosh <user@myserver.example.com>** into the ***Arguments*** field. It is recommended to check the paths to make sure they are accurate in the particular environment.
5. Click ***OK*** to save and close the window.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>It is possible that an update to Remote Desktop Manager 2023 will be needed to make this integration work properly.</p></div>

### Tips and tricks

WSL2 does not support IPv6, only IPv4, but it is possible to change it back to WSL1 by using the following command: `wsl --set-version Debian 1`.

{% hint style="info" %}
Using Mosh through the additional WSL layer may cause authentication limitations; however there is a [workaround](https://forum.devolutions.net/topics/37256/support-for-mosh#175076).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/use-mosh-in-remote-desktop-manager-through-wsl.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
