1 .\" $NetBSD: hosts.equiv.5,v 1.7 2004/11/25 11:40:56 wiz Exp $
3 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 .\" POSSIBILITY OF SUCH DAMAGE.
33 .Nd trusted remote hosts and host-user pairs
39 files list hosts and users which are
41 by the local host when a connection is made via
44 or any other server that uses
46 This mechanism bypasses password checks, and is required for access via
49 Each line of these files has the format:
51 .Bd -unfilled -offset indent -compact
57 may be specified as a host name (typically a fully qualified host
58 name in a DNS environment) or address,
60 (from which only the host names are checked),
63 wildcard (allow all hosts).
67 if specified, may be given as a user name on the remote host,
69 (from which only the user names are checked),
72 wildcard (allow all remote users).
76 is specified, only that user from the specified host may login to the
80 is not specified, any user may login with the same user name.
83 .Bd -filled -offset indent -compact
84 A common usage: users on
86 may login to the local host as the same user name.
89 .Bd -filled -offset indent -compact
94 may login to the local host.
96 .Pa /etc/hosts.equiv ,
97 the user may login with only the same user name.
99 .Li +@anetgroup username
100 .Bd -filled -offset indent -compact
103 may login to the local host from any machine listed in the netgroup
106 .Bd -literal -compact
110 .Bd -filled -offset indent -compact
111 Two severe security hazards.
112 In the first case, allows a user on any
113 machine to login to the local host as the same user name.
114 In the second case, allows any user on any
115 machine to login to the local host (as any user, if in
116 .Pa /etc/hosts.equiv ) .
119 The username checks provided by this mechanism are
121 secure, as the remote user name is received by the server unchecked
123 Therefore this mechanism should only be used
124 in an environment where all hosts are completely trusted.
126 A numeric host address instead of a host name can help security
127 considerations somewhat; the address is then used directly by
130 When a username (or netgroup, or +) is specified in
131 .Pa /etc/hosts.equiv ,
132 that user (or group of users, or all users, respectively) may login to
137 should therefore be used with extreme caution, or not at all.
141 file must be owned by the user whose home directory it resides in, and
142 must be writable only by that user.
144 Logins as root only check root's
148 file is not checked for security.
149 Access permitted through root's
151 file is typically only for
153 as root must still login on the console for an interactive login such as
156 .Bl -tag -width /etc/hosts.equiv -compact
157 .It Pa /etc/hosts.equiv
158 Global trusted host-user pairs list
160 Per-user trusted host-user pairs list
172 file format appeared in
177 implementation currently skips negative entries (preceded with a
179 sign) and does not treat them as ``short-circuit'' negative entries.