1 .\" $OpenBSD: hosts.equiv.5,v 1.12 2010/04/01 17:06:55 jmc 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.
38 .Dd $Mdocdate: April 1 2010 $
44 .Nd trusted remote hosts and host-user pairs
50 files list hosts and users which are
52 by the local host when a 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:
60 .Bd -unfilled -offset indent
66 may be specified as a host name (typically a fully qualified host
67 name in a DNS environment) or address,
69 (from which only the host names are checked),
72 wildcard (allow all hosts).
76 if specified, may be given as a user name on the remote host,
78 (from which only the user names are checked),
81 wildcard (allow all remote users).
85 is specified, only that user from the specified host may log in to the
89 is not specified, any user may log in with the same user name.
91 .Bl -tag -width /etc/hosts.equiv -compact
92 .It Pa /etc/hosts.equiv
93 global trusted host-user pairs list
95 per-user trusted host-user pairs list
100 A common usage; users on
102 may log in to the local host as the same user name.
104 .It Li somehost username
109 may log in to the local host.
111 .Pa /etc/hosts.equiv ,
112 the user may log in with only the same user name.
114 .It Li +@anetgroup username
117 may log in to the local host from any machine listed in the netgroup
122 Two severe security hazards.
123 In the first case, allows a user on any
124 machine to log in to the local host as the same user name.
126 case, allows any user on any machine to log in to the local host (as any
128 .Pa /etc/hosts.equiv ) .
139 file format appeared in
142 The user name checks provided by this mechanism are
144 secure, as the remote user name is received by the server unchecked
146 Therefore this mechanism should only be used
147 in an environment where all hosts are completely trusted.
149 A numeric host address instead of a host name can help security
150 considerations somewhat; the address is then used directly by
153 When a user name (or netgroup, or
156 .Pa /etc/hosts.equiv ,
157 that user (or group of users, or all users, respectively) may log in to
162 should therefore be used with extreme caution, or not at all.
166 file must be owned by the user whose home directory it resides in, and
167 must be writable only by that user.
169 Logins as root only check root's
173 file is not checked for security.
174 Access permitted through root's
176 file is typically only for
181 implementation currently skips negative entries (preceded with a
183 sign) and does not treat them as