1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
<table class="head">
<tr>
<td class="head-ltitle">HOSTS.EQUIV(5)</td>
<td class="head-vol">File Formats Manual</td>
<td class="head-rtitle">HOSTS.EQUIV(5)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">hosts.equiv</code>,
<code class="Nm">rhosts</code> — <span class="Nd">trusted remote host
and user name data base</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <span class="Pa">hosts.equiv</span> and
<span class="Pa">.rhosts</span> files contain information regarding trusted
hosts and users on the network. For each host a single line should be
present with the following information:</p>
<p class="Pp">simple</p>
<div class="Bd Pp Bd-indent">
<pre>hostname [username]</pre>
</div>
<p class="Pp">or the more verbose</p>
<div class="Bd Pp Bd-indent">
<pre>[+-][hostname|@netgroup] [[+-][username|@netgroup]]</pre>
</div>
<p class="Pp">A “@” indicates a host by netgroup or user by
netgroup. A single “+” matches all hosts or users. A host name
with a leading “-” will reject all matching hosts and all
their users. A user name with leading “-” will reject all
matching users from matching hosts.</p>
<p class="Pp">Items are separated by any number of blanks and/or tab characters.
A “#” indicates the beginning of a comment; characters up to
the end of the line are not interpreted by routines which search the
file.</p>
<p class="Pp">Host names are specified in the conventional Internet DNS
dotted-domains “.” (dot) notation using the
<a class="Xr">inet_addr(3)</a> routine from the Internet address
manipulation library, <a class="Xr">inet(3)</a>. Host names may contain any
printable character other than a field delimiter, newline, or comment
character.</p>
<p class="Pp">For security reasons, a user's <code class="Nm">.rhosts</code>
file will be ignored if it is not a regular file, or if it is not owned by
the user, or if it is writable by anyone other than the user.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
<dl class="Bl-tag Bl-compact">
<dt><span class="Pa">/etc/hosts.equiv</span></dt>
<dd>The <code class="Nm">hosts.equiv</code> file resides in
<span class="Pa">/etc</span>.</dd>
<dt><span class="Pa">$HOME/.rhosts</span></dt>
<dd><code class="Nm">.rhosts</code> file resides in
<span class="Pa">$HOME</span>.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
<div class="Bd Bd-indent"><code class="Li">bar.com foo</code></div>
<p class="Pp">Trust user “foo” from host
“bar.com”.</p>
<p class="Pp"></p>
<div class="Bd Bd-indent"><code class="Li">+@allclient</code></div>
<p class="Pp">Trust all hosts from netgroup “allclient”.</p>
<p class="Pp"></p>
<div class="Bd Bd-indent"><code class="Li">+@allclient -@dau</code></div>
<p class="Pp">Trust all hosts from netgroup “allclient” and their
users except users from netgroup “dau”.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">gethostbyname(3)</a>, <a class="Xr">inet(3)</a>,
<a class="Xr">innetgr(3)</a>, <a class="Xr">ruserok(3)</a>,
<a class="Xr">netgroup(5)</a>, <a class="Xr">ifconfig(8)</a>,
<a class="Xr">yp(8)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
<p class="Pp">This manual page is incomplete. For more information read the
source in <span class="Pa">src/lib/libc/net/rcmd.c</span> or the SunOS
manual page.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">April 23, 2026</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|