1MOSH(1)                     General Commands Manual                    MOSH(1)
2
3
4

NAME

6       mosh-server - server-side helper for mosh
7

SYNOPSIS

9       mosh-server  new  [-s]  [-v]  [-i IP] [-p PORT[:PORT2]] [-c COLORS] [--
10       command...]
11

DESCRIPTION

13       mosh-server is a helper program for the mosh(1) remote terminal  appli‐
14       cation.
15
16       mosh-server  binds  to a high UDP port and chooses an encryption key to
17       protect the session. It prints both on standard output,  detaches  from
18       the  terminal, and waits for the mosh-client to establish a connection.
19       It will exit if no client has contacted it within 60 seconds.
20
21       By default, mosh-server binds to a port between  60000  and  61000  and
22       executes the user's login shell.
23
24       On  platforms  with  utempter,  mosh-server  maintains  an entry in the
25       utmp(5) file to indicate its process ID, whether the  session  is  con‐
26       nected, and the client's current IP address.
27
28       mosh-server exits when the client terminates the connection.
29
30

OPTIONS

32       The  argument  "new"  must be first on the command line to use command-
33       line options.
34
35
36       -s     bind to the local interface used for an incoming SSH connection,
37              given in the SSH_CONNECTION environment variable (for multihomed
38              hosts)
39
40
41       -v     Print some debugging information  even  after  detaching.   More
42              instances  of  this  flag will result in more debugging informa‐
43              tion.
44
45
46       -i IP  IP address of the local interface to bind (for multihomed hosts)
47
48
49       -p PORT[:PORT2]
50              UDP port number or port-range to bind.  -p 0 will let the  oper‐
51              ating system pick an available UDP port.
52
53
54       -c COLORS
55              Number of colors to advertise to applications through TERM (e.g.
56              8, 256)
57
58
59       -l NAME=VALUE
60              Locale-related environment variable to try as part of a fallback
61              environment, if the startup environment does not specify a char‐
62              acter set of UTF-8.
63
64

ENVIRONMENT VARIABLES

66       These variables allow server-side  configuration  of  Mosh's  behavior.
67       They   may   be   set  by  administrators  in  system  login/rc  files,
68       /etc/login.conf, or similar  mechanisms,  or  users  in  their  shell's
69       login/rc  files.   mosh-server passes these variables to the login ses‐
70       sion and shell that it starts, but changing them  there  will  have  no
71       effect.
72
73
74       MOSH_SERVER_NETWORK_TMOUT
75              If  this variable is set to a positive integer number, it speci‐
76              fies how long (in seconds) mosh-server will wait to  receive  an
77              update  from the client before exiting.  Since mosh is very use‐
78              ful for mobile clients with intermittent operation  and  connec‐
79              tivity,  we  suggest setting this variable to a high value, such
80              as 604800 (one week) or 2592000  (30  days).   Otherwise,  mosh-
81              server  will  wait  indefinitely for a client to reappear.  This
82              variable is somewhat similar to the TMOUT variable found in many
83              Bourne  shells.   However,  it is not a login-session inactivity
84              timeout; it only applies to network connectivity.
85
86
87       MOSH_SERVER_SIGNAL_TMOUT
88              If this variable is set to a positive integer number, it  speci‐
89              fies how long (in seconds) mosh-server will ignore SIGUSR1 while
90              waiting to  receive  an  update  from  the  client.   Otherwise,
91              SIGUSR1  will  always terminate mosh-server.  Users and adminis‐
92              trators may implement scripts to clean up disconnected Mosh ses‐
93              sions.   With  this  variable  set,  a user or administrator can
94              issue
95
96              $ pkill -SIGUSR1 mosh-server
97
98              to kill disconnected sessions without  killing  connected  login
99              sessions.
100
101

EXAMPLE

103       $ mosh-server
104
105       MOSH CONNECT 60001 UAkFedSsVJs2LfMeKyQB5g
106
107       mosh-server (mosh 1.1)
108       [...] (copyright notice omitted)
109
110       [mosh-server detached, pid = 20443]
111
112

SEE ALSO

114       mosh(1), mosh-client(1).
115
116       Project home page: https://mosh.org
117
118

AUTHOR

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

BUGS

123       Please  report  bugs to mosh-devel@mit.edu. Users may also subscribe to
124       the mosh-users@mit.edu mailing list, at
125       http://mailman.mit.edu/mailman/listinfo/mosh-users
126
127
128
129
130                                 October 2012                          MOSH(1)
Impressum