---
name: "mosh-client"
section: "1"
platform: "linux"
package: "mosh"
version: "1.4.0-35"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/mosh-client"
---

# mosh-client(1)

client-side helper for mosh

## NAME

mosh-client - client-side helper for mosh

## SYNOPSIS

MOSH\_KEY=KEY **mosh-client** \[-v\] IP PORT\
 **mosh-client** -c\

## DESCRIPTION

**mosh-client** is a helper program for the  [**mosh**(1)](/mosh/1.md) remote terminal application.

**mosh** itself is a setup script that establishes an SSH connection, runs the server-side helper **mosh-server**, and collects the server's port number and session key.

**mosh** then executes **mosh-client** with the server's IP address, port, and session key. **mosh-client** runs for the lifetime of the connection.

The 22-byte base64 session key given by **mosh-server** is supplied in the MOSH\_KEY environment variable. This represents a 128-bit AES key that protects the integrity and confidentiality of the session.

For constructing new setup wrappers for remote execution facilities other than SSH, it may be necessary to invoke **mosh-client** directly.

With the -c option, **mosh-client** instead prints the number of colors of the terminal given by the TERM environment variable.

The -v option will print some debugging information on standard error.  More instances of this flag will result in more debugging information.  If standard error is not redirected from the terminal, the display will be corrupted and quickly become unusable.

## ENVIRONMENT VARIABLES

- **MOSH\_KEY**

  This variable must be set, and must contain a Base64-encoded cryptographic key from [**mosh-server**(1)](/mosh-server/1.md).

- **MOSH\_ESCAPE\_KEY**

  See [**mosh**(1)](/mosh/1.md).

- **MOSH\_PREDICTION\_DISPLAY**

  Controls local echo as described in [**mosh**(1)](/mosh/1.md).

- **MOSH\_PREDICTION\_OVERWRITE**

  Controls local echo insert/overwrite as described in [**mosh**(1)](/mosh/1.md).

- **MOSH\_TITLE\_NOPREFIX**

  See [**mosh**(1)](/mosh/1.md).

## SEE ALSO

[**mosh**(1)](/mosh/1.md), [**mosh-server**(1)](/mosh-server/1.md).

Project home page: *https://mosh.org*

## AUTHOR

mosh was written by Keith Winstein \<mosh-devel@mit.edu\>.

## BUGS

Please report bugs to *mosh-devel@mit.edu*. Users may also subscribe to the *mosh-users@mit.edu* mailing list, at\
 *http://mailman.mit.edu/mailman/listinfo/mosh-users*
