Home

mosh

Mosh, short for Mobile Shell, is an open-source remote terminal application designed to provide roaming and resilient access to a shell on a remote computer. It is built to complement SSH by maintaining a persistent session even as the client moves between networks or experiences temporary connectivity losses.

How it works: A mosh client on the local machine connects to a mosh server running on

Features and scope: Mosh supports interactive shells, including common terminal programs and editors, with automatic resynchronization

Availability: Mosh is available on many Unix-like systems, including Linux and macOS, with ports and equivalents

the
remote
host.
SSH
is
used
for
initial
authentication
and
session
setup,
after
which
mosh
uses
its
own
stateful
protocol
to
transmit
keystrokes
and
terminal
updates.
This
protocol
typically
operates
over
UDP
and
is
designed
to
tolerate
latency,
packet
loss,
and
IP
address
changes,
allowing
the
user
to
roam
across
networks
without
reestablishing
a
new
session.
Local
echo
and
predictive
input
handling
help
provide
a
responsive
experience
even
when
the
connection
is
unstable.
when
the
network
returns.
It
preserves
the
user’s
terminal
size
and
cursor
position
and
can
maintain
a
session
across
IP
changes,
sleep,
or
network
interruptions.
It
is
not
a
full
replacement
for
SSH;
certain
SSH
features
such
as
port
forwarding
or
X11
forwarding
are
not
part
of
mosh’s
protocol
and
may
require
alternative
configurations
if
needed.
for
BSD
systems
and
Windows
(via
environments
such
as
Windows
Subsystem
for
Linux
or
Cygwin).
The
remote
host
must
have
the
mosh-server
component
installed,
and
the
local
machine
must
have
the
mosh
client.