CPSA ยท Unix network file, trust and remote access services
Berkeley r* services and trust relationships
rlogin, rsh, hosts.equiv and .rhosts and the impact of weak trust.
Key points
- rlogin, rsh and rcp: legacy Berkeley services that skip the password when host and user are trusted.
- Trust files: /etc/hosts.equiv (system-wide), ~/.rhosts (per user).
- Authentication rests on source address and user name in cleartext, so spoofing or compromising one trusted host abuses it.
- A lone + in these files trusts every host.
- Replace these services with SSH.
Source: https://man7.org/linux/man-pages/man5/hosts.equiv.5.html
Practice questions
Which files define host and user trust for the r* services?
- /etc/hosts.equiv and ~/.rhosts
- /etc/passwd and /etc/shadow
- ~/.ssh/known_hosts and authorized_keys
- /etc/exports and /etc/hosts.allow
Show answer
Answer: A. /etc/hosts.equiv and ~/.rhosts
/etc/hosts.equiv is the system-wide list and ~/.rhosts the per-user list. /etc/passwd and known_hosts have other roles.
Which are Berkeley r* remote services?
- rlogin
- rsh
- scp
- rcp
- sftp
Show answer
Answer: A. rlogin, B. rsh, D. rcp
rlogin, rsh and rcp are the r* services. ssh is the secure replacement, and scp is its file-copy tool.
True or false: rsh is safe on an internal network because trusted hosts are verified by strong cryptography.
Show answer
Answer: False
False. Trust is based on source address and user name with no cryptographic proof, and traffic is cleartext. One compromised or spoofed trusted host breaks the model.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
