aboutsummaryrefslogtreecommitdiffhomepage
path: root/man/mosh-server.1
blob: b73eaa1197a2b7a8c1d7b39e4f2cceca967a1f0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
.\"                                      Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH MOSH 1 "October 2012"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh        disable hyphenation
.\" .hy        enable hyphenation
.\" .ad l      left justify
.\" .ad b      justify to both left and right margins
.\" .nf        disable filling
.\" .fi        enable filling
.\" .br        insert line break
.\" .sp <n>    insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
mosh-server \- server-side helper for mosh
.SH SYNOPSIS
.B mosh-server
new
[\-s]
[\-v]
[\-i \fIIP\fP]
[\-p \fIPORT\fP[:\fIPORT2\fP]]
[\-c \fICOLORS\fP]
[\-\- command...]
.br
.SH DESCRIPTION
\fBmosh-server\fP is a helper program for the 
.BR mosh(1)
remote terminal application.

\fBmosh-server\fP binds to a high UDP port and chooses an encryption
key to protect the session. It prints both on standard output,
detaches from the terminal, and waits for the \fBmosh-client\fP to
establish a connection. It will exit if no client has contacted
it within 60 seconds.

By default, \fBmosh-server\fP binds to a port between 60000 and
61000 and executes the user's login shell.

On platforms with \fButempter\fP, \fBmosh-server\fP maintains an entry
in the
.BR utmp(5)
file to indicate its process ID, whether the session is connected,
and the client's current IP address.

\fBmosh-server\fP exits when the client terminates the connection.

.SH OPTIONS

The argument "new" must be first on the command line to use
command-line options.

.TP
.B \-s
bind to the local interface used for an incoming SSH connection, given
in the \fBSSH_CONNECTION\fP environment variable (for multihomed
hosts)

.TP
.B \-v
Print some debugging information even after detaching.  More instances
of this flag will result in more debugging information.

.TP
.B \-i \fIIP\fP
IP address of the local interface to bind (for multihomed hosts)

.TP
.B \-p \fIPORT\fP[:\fIPORT2\fP]
UDP port number or port-range to bind.  \fB\-p 0\fP will let the
operating system pick an available UDP port.

.TP
.B \-c \fICOLORS\fP
Number of colors to advertise to applications through TERM (e.g. 8, 256)

.TP
.B \-l \fINAME=VALUE\fP
Locale-related environment variable to try as part of a fallback
environment, if the startup environment does not specify a character
set of UTF-8.

.SH ENVIRONMENT VARIABLES
These variables allow server-side configuration of Mosh's behavior.
They may be set by administrators in system login/rc files,
/etc/login.conf, or similar mechanisms, or users in their shell's
login/rc files.  \fBmosh-server\fP passes these variables to the login
session and shell that it starts, but changing them there will have no
effect.

.TP
.B MOSH_SERVER_NETWORK_TMOUT
If this variable is set to a positive integer number, it specifies how
long (in seconds) \fBmosh-server\fP will wait to receive an update from the
client before exiting.  Since \fPmosh\fP is very useful for mobile
clients with intermittent operation and connectivity, we suggest
setting this variable to a high value, such as 604800 (one week) or
2592000 (30 days).  Otherwise, \fBmosh-server\fP will wait
indefinitely for a client to reappear.  This variable is somewhat
similar to the \fBTMOUT\fP variable found in many Bourne shells.
However, it is not a login-session inactivity timeout; it only applies
to network connectivity.

.TP
.B MOSH_SERVER_SIGNAL_TMOUT
If this variable is set to a positive integer number, it specifies how
long (in seconds) \fBmosh-server\fP will ignore SIGUSR1 while waiting
to receive an update from the client.  Otherwise, \fBSIGUSR1\fP will
always terminate \fBmosh-server\fP.  Users and administrators may
implement scripts to clean up disconnected Mosh sessions.  With this
variable set, a user or administrator can issue

.nf
$ pkill -SIGUSR1 mosh-server
.fi

to kill disconnected sessions without killing connected login
sessions.

.SH EXAMPLE

.nf
$ mosh-server

MOSH CONNECT 60001 UAkFedSsVJs2LfMeKyQB5g

mosh-server (mosh 1.1)
[...] (copyright notice omitted)

[mosh-server detached, pid = 20443]
.fi

.SH SEE ALSO
.BR mosh (1),
.BR mosh-client (1).

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

.br
.SH AUTHOR
mosh was written by Keith Winstein <mosh-devel@mit.edu>.
.SH BUGS
Please report bugs to \fImosh-devel@mit.edu\fP. Users may also subscribe
to the
.nh
.I mosh-users@mit.edu
.hy
mailing list, at
.br
.nh
.I http://mailman.mit.edu/mailman/listinfo/mosh-users
.hy
.