hosts.equiv(5)
๐ hosts.equiv(5) ๐
File Formats Manual energy, but make it a group chat ๐ซถ โ this is the tea on hosts.equiv, and bestie, it's a whole trust-fall situation with your network. Let's get into it โจ
๐ธ NAME ๐ธ
hosts.equiv โ the list of hosts and users that are granted "trusted" r command access to your system ๐
โจ DESCRIPTION โจ
okay so, the file /etc/hosts.equiv is literally the bouncer at the club ๐ โ it allows or denies hosts and users to use the r-commands (like rlogin, rsh, or rcp) without supplying a password. No password. Just vibes. ๐ญ
The file uses the following format:
+|[-]hostname|+@netgroup|-@netgroup
[+|[-]username|+@netgroup|-@netgroup]
So like, let's break it down ๐
The hostname is the name of a host which is logically equivalent to the local host. Users logged into that host are allowed to access like-named user accounts on the local host without supplying a password. The hostname may be (optionally) preceded by a plus (+) sign. If the plus sign is used alone, it allows any host to access your system ๐ณ. You can explicitly deny access to a host by preceding the hostname by a minus (-) sign. Users from that host must always supply additional credentials, including possibly a password. For security reasons you should always use the FQDN of the hostname and not the short hostname ๐ซถ (fr fr, do it).
The username entry grants a specific user access to all user accounts (except root) without supplying a password. That means the user is NOT restricted to like-named accounts โ they're out here living their main character era in everybody's account ๐. The username may be (optionally) preceded by a plus (+) sign. You can also explicitly deny access to a specific user by preceding the username with a minus (-) sign. This says that the user is not trusted no matter what other entries for that host exist. Periodt.
Netgroups can be specified by preceding the netgroup by an @ sign โจ
โ ๏ธ Be extremely careful when using the plus (+) sign, bestie. A simple typographical error could result in a standalone plus sign. A standalone plus sign is a wildcard character that means "any host" ๐ญ๐ญ๐ญ not the vibe you want.
๐ FILES ๐
/etc/hosts.equiv
๐ NOTES ๐
Some systems will honor the contents of this file only when it has owner root and no write permission for anybody else ๐. Some exceptionally paranoid systems even require that there be no other hard links to the file ๐ง
Modern systems use the Pluggable Authentication Modules library (PAM). With PAM a standalone plus sign is considered a wildcard character which means "any host" only when the word promiscuous is added to the auth component line in your PAM file for the particular service (e.g., rlogin).
๐ EXAMPLES ๐
Below are some example /etc/host.equiv or ~/.rhosts files ๐
Allow any user to log in from any host:
+
Allow any user from host with a matching local account to log in:
host
๐ Note: the use of +host is never a valid syntax, including attempting to specify that any user from the host is allowed. Not it. ๐
Allow any user from host to log in:
host +
๐ Note: this is distinct from the previous example since it does not require a matching local account ๐
Allow user from host to log in as any non-root user:
host user
Allow all users with matching local accounts from host to log in except for baduser:
host -baduser
host
Deny all users from host:
-host
๐ Note: the use of -host -user is never a valid syntax, including attempting to specify that a particular user from the host is not trusted ๐
Allow all users with matching local accounts on all hosts in a netgroup:
+@netgroup
Disallow all users on all hosts in a netgroup:
-@netgroup
Allow all users in a netgroup to log in from host as any non-root user:
host +@netgroup
Allow all users with matching local accounts on all hosts in a netgroup except baduser:
+@netgroup -baduser
+@netgroup
โ ๏ธ Note: the deny statements must always precede the allow statements because the file is processed sequentially until the first matching rule is found. Order matters, bestie, always ๐ธ
๐ SEE ALSO ๐
and that's the whole page, bestie ๐ฅฐ stay safe out there and maybe don't leave a stray + lying around ๐โจ๐๐ฆ
signed off with love by Linux man-pages 6.20, dated 2026-02-08 โ slay ๐ ๐
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: GPL-1.0-or-later
- Copyright 1995, Peter Tobias <tobias@et-inf.fho-emden.de>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms