Bitzu

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

Single choice

Which files define host and user trust for the r* services?

  1. /etc/hosts.equiv and ~/.rhosts
  2. /etc/passwd and /etc/shadow
  3. ~/.ssh/known_hosts and authorized_keys
  4. /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.

Select all that apply

Which are Berkeley r* remote services?

  1. rlogin
  2. rsh
  3. scp
  4. rcp
  5. 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

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.

Download on the App StoreGet it on Google Play

More CPSA topics in this module