Berkeley r-commands explained

Berkeley r-commands
Developer:Computer Systems Research Group at the University of California, Berkeley
Operating System:Unix and Unix-like
Genre:Command suite
License:BSD

The Berkeley r-commands are a suite of computer programs designed to enable users of one Unix system to log in or issue commands to another Unix computer via TCP/IP computer network.[1] The r-commands were developed in 1982 by the Computer Systems Research Group at the University of California, Berkeley, based on an early implementation of TCP/IP (the protocol stack of the Internet).[2]

The CSRG incorporated the r-commands into their Unix operating system, the Berkeley Software Distribution (BSD). The r-commands premiered in BSD v4.1.[2] Among the programs in the suite are: (remote copy), (remote execution), (remote login), (remote shell),,, and (remote who).[2] [3]

The r-commands were a significant innovation, and became de facto standards for Unix operating systems.[4] [5] With wider public adoption of the Internet, their inherent security vulnerabilities became a problem,[6] and beginning with the development of Secure Shell protocols and applications in 1995, its adoption entirely supplanted the deployment and use of r-commands (and Telnet) on networked systems.[7]

Service !! scope="col" rowspan="2"
Port !
Daemon
rcp rshd 514 TCP
rexecd 512 TCP [8]
rlogin rlogind 513 TCP [9]
rsh rshd 514 TCP
rstat rstatd UDP
ruptime rwhod 513 UDP [10]
rwho

Protocol

The original Berkeley package that provides also features (remote-copy, allowing files to be copied over the network) and rsh (remote-shell, allowing commands to be run on a remote machine without the user logging into it).

As an example, the protocol is as follows:[11] Client:user name on the clientuser name on the serverterminal type/terminal baud rate

Server:The server would check that the user should have access. If so, it returns a message with nothing in it (not even a null character), meaning the connection is established.

For example:Client:bostickbosticvt100/9600

Server:Both and share the (applies to all users on the server) and (applies to only the user that puts the file in its home folder) access-control scheme, although they connect to different daemons. connects to, while connects to .

and uses the same format. The following shows some aspects of the format:[12] [13] host1host2 user_a-host3+@group1 -user_b-@group2This allows all users from host1 to login, user_a from host2 to login, no users from host3, all users on group1 except user_b, and no users on group2.

Commands

rlogin

See also: Telnet.

enables a user to log in on another server via computer network, using TCP network port 513.

is also the name of the application layer protocol used by the software, part of the TCP/IP protocol suite. Authenticated users can act as if they were physically present at the computer. RFC 1282, in which it was defined, states: "The facility provides a remote-echoed, locally flow-controlled virtual terminal with proper flushing of output." communicates with a daemon,, on the remote host. is similar to the Telnet command, but is not as customizable and is able to connect only to Unix-like hosts.

rsh

opens a shell on a remote computer without a login procedure. Once connected, the user can execute commands on the remote computer through the shell's command-line interface. passes input and output through the standard streams, and it sends standard output to the user's console. Over the network, standard input and standard out flow through TCP port 514, while Standard Error flows through a different TCP port, which the daemon opens.[14]

rexec

Like, enables the user to run shell commands on a remote computer. However, unlike the rsh server, the server requires login: it authenticates users by reading the username and password (unencrypted) from the network socket.[15] uses TCP port 512.

rcp

can copy a file or directory from the local system to a remote system, from a remote system to the local system, or from one remote system to another.[16] The command line arguments of and are similar, but in remote files are prefixed with the name of the remote system:

rcp file.txt subdomain.domain:~/home/foo/file.txt

As with the Unix copy command cp, overwrites an existing file of the same name in the target; unlike, it provides no mechanism for warning the user before overwriting the target file.[16] Like, uses TCP port 514.[17]

rwho

Just as the who command lists the users who are logged in to the local Unix system, lists those users who are logged into all multi-user Unix systems on the local network.[18] 's daemon,, maintains a database of the status of Unix systems on the local network. The daemon and its database are also used by the program.[19]

rstat

returns performance statistics from the kernel.

ruptime

Just as the command shows how long a Unix system has been running since the last restart, requests a status report from all computers on the local network. It then returns the uptime report. If a computer did not respond within the time limit, then reports that the system is down.[20] This information is tracked and stored by the daemon, which is also used by the rwho command.[19]

Security

Those r-commands which involve user authentication (and) share several serious security vulnerabilities:

Due to these problems, the r-commands fell into relative disuse (with many Unix and Linux distributions no longer including them by default). Many networks that formerly relied on and have replaced them with SSH and its -equivalent .[21] [22]

See also

References

Further reading

External links

Notes and References

  1. Book: Horwitz, Jeff . Unix System Management: Primer Plus . Using the Berkeley r-commands Without a Password . https://books.google.com/books?id=-sue_SyjuCMC&pg=PA339 . 339 . 2003 . 2002 . Sams Publishing . Google Books . 978-0-672-32372-0 . 2018-03-04.
  2. Book: McKusick, Marshall Kirk . Marshall Kirk McKusick

    . Open Sources: Voices from the Open Source Revolution . Marshall Kirk McKusick . 1999 . 978-1-56592-582-3 . Twenty Years of Berkeley Unix: From AT&T-Owned to Freely Redistributable . http://www.oreilly.com/openbook/opensources/book/kirkmck.html . O'Reilly & Associates . Section: "4.2BSD" . 2018-03-03 . Open Sources: Voices from the Open Source Revolution .

  3. Book: Guide to TCP/IP: IPv6 and IPv4 . James . Pyles . Jeffrey L. . Carrell . Ed . Tittel . Which IP Services Are Most Vulnerable? . https://books.google.com/books?id=sQevDAAAQBAJ&pg=PA659 . 659 . Cengage Learning . 2017 . 5th . 978-1-305-94695-8 . Google Books.
  4. Casad (2008), p. 346
  5. Book: Negus, Christopher . Red Hat Fedora Linux 2 Bible . Wiley . 0-7645-5745-9 . 441918216 . About "r" Commands . https://www.wiley.com/legacy/compbooks/negus/rhbf2/r-commands.html . 2018-03-04. 2004-07-02 .
  6. 10.1.1.178.8497. A Case Study of Using a Secure Network Layer Protocol.
  7. How and Why More Secure Technologies Succeed in Legacy Markets: Lessons from the Success of SSH. 13 April 2023. Nicholas Rosasco. David Larochelle. Harvard University. Conference Paper. 10.1007/1-4020-8090-5_18. 19035681 .
  8. Book: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.halu001/rexsyn.htm . REXEC command—Execute a command on the remote host and receive the results on your local host . z/OS Communications Server: IP User's Guide and Commands . 1990 . 2013 . 2018-03-04.
  9. Book: FreeBSD Network Administrators Guide . https://people.freebsd.org/~nik/nag/book.html#x-087-2-intro.tcpip.ports . More on Ports . 2018-03-04.
  10. Casad (2008), pp. 350–51
  11. BSD Rlogin . Kantor . Brian . December 1991 . Internet Engineering Task Force . RFC 1282.
  12. Web site: .rhosts File Format for TCP/IP . 2023-11-29 . www.ibm.com . en-us.
  13. Web site: hosts.equiv File Format for TCP/IP . 2023-11-29 . www.ibm.com . en-us.
  14. Book: CCSP: Secure PIX and Secure VPN Study Guide . Edwards . Wade . Lancaster . Tom . Quinn . Eric . Rohm . Jason . Tow . Bryant. . 154 . 0-7821-4287-7 . 2004 . Google Books . 2018-03-07.
  15. Web site: rexecd(8) . manpagez.com . 2018-03-03.
  16. Web site: rcp . Farrell . Phillip . 3 August 2004 . earthsci.stanford.edu . Stanford University School of Earth, Energy & Environmental Sciences . 2018-03-06 . 2021-02-07 . https://web.archive.org/web/20210207204751/https://earthsci.stanford.edu/computing/unix/netcommands/rcp.php . dead .
  17. Web site: Rlogin, RSH, and RCP . SourceDaddy . 2018-02-18.
  18. Web site: rwho (1) - Linux Man Pages . 2018-03-07.
  19. Web site: rwhod (8) - Linux Man Pages . 2018-03-07.
  20. Web site: ruptime (1) - Linux Man Pages . SysTutorials . 2018-03-07.
  21. Book: Sobell, Mark. A Practical Guide to Linux Commands, Editors, and Shell Programming. 978-0-13-136736-4. 2010. Pearson Education, Inc.
  22. Web site: Unix job control command list. Indiana University. 20 December 2014.