Berkeley r-commands

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]

Berkeley r-commands
Developer(s)Computer Systems Research Group at the University of California, Berkeley
Initial releaseJune 1981 (1981-06)
Operating systemUnix and Unix-like
TypeCommand suite
LicenseBSD

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: rcp (remote copy), rexec (remote execution), rlogin (remote login), rsh (remote shell), rstat, ruptime, and rwho (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]

Authentication

Overview
ServicePortTransportRefs
ClientDaemon
rcprshd514TCP
rexecrexecd512TCP[8]
rloginrlogind513TCP[9]
rshrshd514TCP
rstatrstatdUDP
ruptimerwhod513UDP[10]
rwho[9][10]

The original Berkeley package that provides rlogin also features rcp (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). These share the hosts.equiv and .rhosts access-control scheme (although they connect to a different daemon, rshd).

Commands

rlogin

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

rlogin 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 rlogin facility provides a remote-echoed, locally flow-controlled virtual terminal with proper flushing of output." rlogin communicates with a daemon, rlogind, on the remote host. rlogin is similar to the Telnet command, but is not as customizable and is able to connect only to Unix-like hosts.

rsh

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. rsh 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 rsh daemon (rshd) opens.[11]

rexec

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

rcp

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.[13] The command line arguments of cp and rcp are similar, but in rcp 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, rcp overwrites an existing file of the same name in the target; unlike cp, it provides no mechanism for warning the user before overwriting the target file.[13] Like rsh, rcp uses TCP port 514.[14]

rwho

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

rstat

ruptime

Just as the uptime command shows how long a Unix system has been running since the last restart, ruptime 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 ruptime reports that the system is down.[17] This information is tracked and stored by the daemon rwhod, which is also used by the rwho command.[16]

Security

Those r-commands which involve user authentication (rcp, rexec, rlogin, and rsh) share several serious security vulnerabilities:

  • All information, including passwords, is transmitted unencrypted (making it vulnerable to interception).
  • The .rlogin (or .rhosts) file is easy to misuse. They are designed to allow logins without a password, but their reliance on remote usernames, hostnames, and IP addresses is exploitable. For this reason many corporate system administrators prohibit .rhosts files, and actively scrutinize their networks for offenders.
  • The protocol partly relies on the remote party's rlogin client to provide information honestly, including source port and source host name. A corrupt client is thus able to forge this and gain access, as the rlogin protocol has no means of authenticating other machines' identities, or ensuring that the requesting client on a trusted machine is the real rlogin client.
  • The common practice of mounting users' home directories via NFS exposes rlogin to attack by means of fake .rhosts files - this means that any of NFS's security faults automatically plague rlogin.

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 rlogin and telnet have replaced them with SSH and its rlogin-equivalent slogin.[18][19]

gollark: That was LITERALLY APPROXIMATELY my idea.
gollark: The obvious way to do it is some kind of self-replicating turtle swarm making diamond chests to store cobblestone in.
gollark: Well, my house is right above the void.
gollark: I can rapidly burn through cobblestone by dumping it into cobblestone removal dumps.
gollark: ÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆ BEE THE CONCEPT OF WIRELESS NETWORKING

See also

Notes

  1. Horwitz, Jeff (2003) [2002]. "Using the Berkeley r-commands Without a Password". Unix System Management: Primer Plus. Sams Publishing. p. 339. ISBN 978-0-672-32372-0. Retrieved 2018-03-04 via Google Books.
  2. McKusick, Marshall Kirk (1999). "Twenty Years of Berkeley Unix: From AT&T-Owned to Freely Redistributable". Open Sources: Voices from the Open Source Revolution. O'Reilly & Associates. Section: "4.2BSD". ISBN 978-1-56592-582-3. Retrieved 2018-03-03.
  3. Pyles, James; Carrell, Jeffrey L.; Tittel, Ed (2017). "Which IP Services Are Most Vulnerable?". Guide to TCP/IP: IPv6 and IPv4 (5th ed.). Cengage Learning. p. 659. ISBN 978-1-305-94695-8 via Google Books.
  4. Casad (2008), p. 346
  5. Negus, Christopher (2004-07-02). "About "r" Commands". Red Hat Fedora Linux 2 Bible. Wiley. ISBN 0-7645-5745-9. OCLC 441918216. Retrieved 2018-03-04.
  6. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.178.8497&rep=rep1&type=pdf
  7. https://dash.harvard.edu/bitstream/handle/1/16781951/sshVsTelnetWeb3.pdf?sequence=1
  8. "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. 2013 [1990]. Retrieved 2018-03-04.
  9. "More on Ports". FreeBSD Network Administrators Guide. Retrieved 2018-03-04.
  10. Casad (2008), pp. 350–51
  11. Edwards, Wade; Lancaster, Tom; Quinn, Eric; Rohm, Jason; Tow, Bryant (2004). CCSP: Secure PIX and Secure VPN Study Guide. Sybex. p. 154. ISBN 0-7821-4287-7. Retrieved 2018-03-07 via Google Books.
  12. "rexecd(8)". manpagez.com. Retrieved 2018-03-03.
  13. Farrell, Phillip (3 August 2004). "rcp". earthsci.stanford.edu. Stanford University School of Earth, Energy & Environmental Sciences. Retrieved 2018-03-06.
  14. "Rlogin, RSH, and RCP". SourceDaddy. Retrieved 2018-02-18.
  15. "rwho (1) - Linux Man Pages". Retrieved 2018-03-07.
  16. "rwhod (8) - Linux Man Pages". Retrieved 2018-03-07.
  17. "ruptime (1) - Linux Man Pages". SysTutorials. Retrieved 2018-03-07.
  18. Sobell, Mark (2010). A Practical Guide to Linux Commands, Editors, and Shell Programming. Pearson Education, Inc. ISBN 978-0-13-136736-4.
  19. "Unix job control command list". Indiana University. Retrieved 20 December 2014.

References

  • This article is based on material taken from the Free On-line Dictionary of Computing prior to 1 November 2008 and incorporated under the "relicensing" terms of the GFDL, version 1.3 or later.
  • Casad, Joe (2008). "Berkeley Remote Utilities". Sams Teach Yourself TCP/IP in 24 Hours. Pearson Education. ISBN 978-0-13-271513-3 via Google Books.

Further reading

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.