mosh-client - Man Page

client-side helper for mosh


MOSH_KEY=KEY mosh-client [-v] IP PORT
mosh-client -c


mosh-client is a helper program for the mosh(1) 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


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


See mosh(1).


Controls local echo as described in mosh(1).


Controls local echo insert/overwrite as described in mosh(1).


See mosh(1).

See Also

mosh(1), mosh-server(1).

Project home page:


mosh was written by Keith Winstein <>.


Please report bugs to Users may also subscribe to the mailing list, at

Referenced By

mosh(1), mosh-server(1).

February 2012