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