1b7348f75771813f410f4cab887965538a39d671
[dragonfly.git] / libexec / rlogind / rlogind.8
1 .\" Copyright (c) 1983, 1989, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)rlogind.8   8.1 (Berkeley) 6/4/93
29 .\" $FreeBSD: src/libexec/rlogind/rlogind.8,v 1.13.2.4 2001/08/16 10:44:17 ru Exp $
30 .\" $DragonFly: src/libexec/rlogind/rlogind.8,v 1.4 2006/02/17 19:33:31 swildner Exp $
31 .\"
32 .Dd June 4, 1993
33 .Dt RLOGIND 8
34 .Os
35 .Sh NAME
36 .Nm rlogind
37 .Nd remote login server
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl Daln
41 .Sh DESCRIPTION
42 .Nm Rlogind
43 is the server for the
44 .Xr rlogin 1
45 program.  The server provides a remote login facility
46 with authentication based on privileged port numbers from trusted hosts.
47 .Pp
48 Options supported by
49 .Nm :
50 .Bl -tag -width indent
51 .It Fl D
52 Set TCP_NODELAY socket option. This improves responsiveness at the expense of
53 some additional network traffic.
54 .It Fl a
55 Ask hostname for verification.
56 .It Fl l
57 Prevent any authentication based on the user's
58 .Dq Pa .rhosts
59 file, unless the user is logging in as the superuser.
60 .It Fl n
61 Disable keep-alive messages.
62 .El
63 .Pp
64 The following options are valid only if Kerberos is in use:
65 .Bl -tag -width indent
66 .It Fl k
67 Enable Kerberos authentication.
68 .It Fl v
69 Enable vacuous mode.
70 .It Fl x
71 Enable
72 .Tn DES
73 encryption for all data passed via the rlogin
74 session.  This may impact response time
75 and
76 .Tn CPU
77 utilization, but provides increased security.
78 .El
79 .Pp
80 .Nm Rlogind
81 listens for service requests at the port indicated in
82 the
83 .Dq login
84 service specification; see
85 .Xr services 5 .
86 When a service request is received the following protocol
87 is initiated:
88 .Bl -enum
89 .It
90 The server checks the client's source port.
91 If the port is not in the range 512-1023, the server
92 aborts the connection.
93 .It
94 The server checks the client's source address
95 and requests the corresponding host name (see
96 .Xr gethostbyaddr 3 ,
97 .Xr hosts 5
98 and
99 .Xr named 8 ) .
100 If the hostname cannot be determined,
101 the dot-notation representation of the host address is used.
102 If the hostname is in the same domain as the server (according to
103 the last two components of the domain name),
104 or if the
105 .Fl a
106 option is given,
107 the addresses for the hostname are requested,
108 verifying that the name and address correspond.
109 Normal authentication is bypassed if the address verification fails.
110 .El
111 .Pp
112 Once the source port and address have been checked,
113 .Nm
114 proceeds with the authentication process described in
115 .Xr rshd 8 .
116 It then allocates a pseudo terminal (see
117 .Xr pty 4 ) ,
118 and manipulates file descriptors so that the slave
119 half of the pseudo terminal becomes the
120 .Em stdin ,
121 .Em stdout ,
122 and
123 .Em stderr
124 for a login process.
125 The login process is an instance of the
126 .Xr login 1
127 program, invoked with the
128 .Fl f
129 option if authentication has succeeded.
130 If automatic authentication fails, the user is
131 prompted to log in as if on a standard terminal line.
132 .Pp
133 The parent of the login process manipulates the master side of
134 the pseudo terminal, operating as an intermediary
135 between the login process and the client instance of the
136 .Xr rlogin 1
137 program.  In normal operation, the packet protocol described
138 in
139 .Xr pty 4
140 is invoked to provide
141 .Ql ^S/^Q
142 type facilities and propagate
143 interrupt signals to the remote programs.  The login process
144 propagates the client terminal's baud rate and terminal type,
145 as found in the environment variable,
146 .Ev TERM ;
147 see
148 .Xr environ 7 .
149 The screen or window size of the terminal is requested from the client,
150 and window size changes from the client are propagated to the pseudo terminal.
151 .Pp
152 Transport-level keepalive messages are enabled unless the
153 .Fl n
154 option is present.
155 The use of keepalive messages allows sessions to be timed out
156 if the client crashes or becomes unreachable.
157 .Sh FILES
158 .Bl -tag -width /etc/hostsxxxxxxxx -compact
159 .It Pa /etc/hosts
160 .It Pa /etc/hosts.equiv
161 .It Ev $HOME Ns Pa /.rhosts
162 .It Pa /var/run/nologin
163 .El
164 .Sh DIAGNOSTICS
165 All initial diagnostic messages are indicated
166 by a leading byte with a value of 1,
167 after which any network connections are closed.
168 If there are no errors before
169 .Xr login 1
170 is invoked, a null byte is returned as in indication of success.
171 .Bl -tag -width Ds
172 .It Sy Try again.
173 A
174 .Xr fork 2
175 by the server failed.
176 .El
177 .Sh SEE ALSO
178 .Xr login 1 ,
179 .Xr ruserok 3 ,
180 .Xr hosts 5 ,
181 .Xr hosts.equiv 5 ,
182 .Xr login.conf 5 ,
183 .Xr nologin 5 ,
184 .Xr services 5 ,
185 .Xr rshd 8
186 .Sh HISTORY
187 The
188 .Nm
189 command appeared in
190 .Bx 4.2 .
191 .Pp
192 IPv6 support was added by WIDE/KAME project.
193 .Sh BUGS
194 The authentication procedure used here assumes the integrity
195 of each client machine and the connecting medium.  This is
196 insecure, but is useful in an
197 .Dq open
198 environment.
199 .Pp
200 A facility to allow all data exchanges to be encrypted should be
201 present.
202 .Pp
203 A more extensible protocol should be used.