1 .\" $OpenBSD: hosts.equiv.5,v 1.1 1997/11/30 05:35:25 deraadt Exp $
3 .\" Copyright (c) 1997 Todd Vierling
4 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
5 .\" All rights reserved.
7 .\" This code is derived from software contributed to The NetBSD Foundation
8 .\" by Todd Vierling <tv@pobox.com>.
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in the
17 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. All advertising materials mentioning features or use of this software
19 .\" must display the following acknowledgement:
20 .\" This product includes software developed by the NetBSD
21 .\" Foundation, Inc. and its contributors.
22 .\" 4. Neither the name of The NetBSD Foundation nor the names of its
23 .\" contributors may be used to endorse or promote products derived
24 .\" from this software without specific prior written permission.
26 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 .\" POSSIBILITY OF SUCH DAMAGE.
44 .Nd trusted remote hosts and host-user pairs
50 files list hosts and users which are ``trusted'' by the local host when a
51 connection is made via
54 or any other server that uses
56 This mechanism bypasses password checks, and is required for access via
59 Each line of these files has the format:
61 .Bd -unfilled -offset indent -compact
67 may be specified as a host name (typically a fully qualified host
68 name in a DNS environment) or address,
70 (from which only the host names are checked),
71 or a ``+'' wildcard (allow all hosts).
75 if specified, may be given as a user name on the remote host,
77 (from which only the user names are checked),
78 or a ``+'' wildcard (allow all remote users).
82 is specified, only that user from the specified host may login to the
85 is not specified, any user may login with the same user name.
88 .Bd -filled -offset indent -compact
89 A common usage: users on
91 may login to the local host as the same user name.
94 .Bd -filled -offset indent -compact
99 may login to the local host. If specified in
100 .Em /etc/hosts.equiv ,
101 the user may login with only the same user name.
103 .Li +@anetgroup username
104 .Bd -filled -offset indent -compact
107 may login to the local host from any machine listed in the netgroup
110 .Bd -literal -compact
114 .Bd -filled -offset indent -compact
115 Two severe security hazards. In the first case, allows a user on any
116 machine to login to the local host as the same user name. In the second
117 case, allows any user on any machine to login to the local host (as any
119 .Em /etc/hosts.equiv ) .
122 The username checks provided by this mechanism are
124 secure, as the remote user name is received by the server unchecked
125 for validity. Therefore this mechanism should only be used
126 in an environment where all hosts are completely trusted.
128 A numeric host address instead of a host name can help security
129 considerations somewhat; the address is then used directly by
132 When a username (or netgroup, or +) is specified in
133 .Em /etc/hosts.equiv ,
134 that user (or group of users, or all users, respectively) may login to
139 should therefore be used with extreme caution, or not at all.
143 file must be owned by the user whose home directory it resides in, and
144 must be writable only by that user.
146 Logins as root only check root's
150 file is not checked for security. Access permitted through root's
152 file is typically only for
154 as root must still login on the console for an interactive login such as
157 .Bl -tag -width /etc/hosts.equiv -compact
158 .It Pa /etc/hosts.equiv
159 Global trusted host-user pairs list
161 Per-user trusted host-user pairs list
173 file format appeared in
178 implementation currently skips negative entries (preceded with a
179 ``-'' sign) and does not treat them as ``short-circuit'' negative entries.