HOME

TheInfoList



OR:

The Berkeley r-commands are a
suite Suite may refer to: Arts and entertainment *Suite (music), a set of musical pieces considered as one composition ** Suite (Bach), a list of suites composed by J. S. Bach ** Suite (Cassadó), a mid-1920s composition by Gaspar Cassadó ** ''Suite' ...
of
computer program A computer program is a sequence or set of instructions in a programming language for a computer to execute. Computer programs are one component of software, which also includes documentation and other intangible components. A computer program ...
s designed to enable users of one
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
system to log in or issue commands to another
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
computer via
TCP/IP The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the set of communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the suit ...
computer network A computer network is a set of computers sharing resources located on or provided by network nodes. The computers use common communication protocols over digital interconnections to communicate with each other. These interconnections are ...
. The r-commands were developed in 1982 by the
Computer Systems Research Group The Computer Systems Research Group (CSRG) was a research group at the University of California, Berkeley that was dedicated to enhancing AT&T Unix operating system and funded by Defense Advanced Research Projects Agency. History Professor Bo ...
at the
University of California, Berkeley The University of California, Berkeley (UC Berkeley, Berkeley, Cal, or California) is a public land-grant research university in Berkeley, California. Established in 1868 as the University of California, it is the state's first land-grant u ...
, based on an early implementation of
TCP/IP The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the set of communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the suit ...
(the protocol stack of the
Internet The Internet (or internet) is the global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a '' network of networks'' that consists of private, pub ...
). The CSRG incorporated the r-commands into their
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
, the
Berkeley Software Distribution The Berkeley Software Distribution or Berkeley Standard Distribution (BSD) is a discontinued operating system based on Research Unix, developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berk ...
(BSD). The r-commands premiered in BSD v4.1. Among the programs in the suite are: (remote
copy Copy may refer to: *Copying or the product of copying (including the plural "copies"); the duplication of information or an artifact **Cut, copy and paste, a method of reproducing text or other data in computing **File copying **Photocopying, a pr ...
), (remote execution), (remote login), (remote shell), , , and (remote who). The r-commands were a significant innovation, and became ''de facto'' standards for Unix operating systems. With wider public adoption of the Internet, their inherent security vulnerabilities became a problem, and beginning with the development of
Secure Shell The Secure Shell Protocol (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. Its most notable applications are remote login and command-line execution. SSH applications are based on a ...
protocols and applications in 1995, its adoption entirely supplanted the deployment and use of r-commands (and Telnet) on networked systems.


Authentication

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

enables a user to log in on another
server Server may refer to: Computing *Server (computing), a computer program or a device that provides functionality for other programs or devices, called clients Role * Waiting staff, those who work at a restaurant or a bar attending customers and su ...
via
computer network A computer network is a set of computers sharing resources located on or provided by network nodes. The computers use common communication protocols over digital interconnections to communicate with each other. These interconnections are ...
, using
TCP TCP may refer to: Science and technology * Transformer coupled plasma * Tool Center Point, see Robot end effector Computing * Transmission Control Protocol, a fundamental Internet standard * Telephony control protocol, a Bluetooth communication s ...
network port 513. rlogin is also the name of the
application layer An application layer is an abstraction layer that specifies the shared communications protocols and Interface (computing), interface methods used by Host (network), hosts in a communications network. An ''application layer'' abstraction is speci ...
protocol Protocol may refer to: Sociology and politics * Protocol (politics), a formal agreement between nation states * Protocol (diplomacy), the etiquette of diplomacy and affairs of state * Etiquette, a code of personal behavior Science and technology ...
used by the software, part of the
TCP/IP The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the set of communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the suit ...
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 Telnet is an application protocol used on the Internet or local area network to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection. User data is interspersed in-band with Telnet control i ...
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 A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
. rsh passes input and output through the standard streams, and it sends standard output to the user's console. Over the network,
standard input In computer programming, standard streams are interconnected input and output communication channels between a computer program and its environment when it begins execution. The three input/output (I/O) connections are called standard input (stdin ...
and standard out flow through TCP port 514, while Standard Error flows through a different TCP port, which the rsh daemon (rshd) opens.


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 A network socket is a software structure within a network node of a computer network that serves as an endpoint for sending and receiving data across the network. The structure and properties of a socket are defined by an application programming ...
. 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. 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. Like rsh, rcp uses TCP port 514.


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. 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.


rstat

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 ruptime reports that the system is down. This information is tracked and stored by the daemon rwhod, which is also used by the rwho command.


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 Authentication (from ''authentikos'', "real, genuine", from αὐθέντης ''authentes'', "author") is the act of proof (truth), proving an Logical assertion, assertion, such as the Digital identity, identity of a computer system user. In ...
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 Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
distributions no longer including them by default). Many networks that formerly relied on rlogin and telnet have replaced them with
SSH The Secure Shell Protocol (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. Its most notable applications are remote login and command-line execution. SSH applications are based on a ...
and its rlogin-equivalent ''slogin''.


See also

* List of Unix commands


Notes


References

*


Further reading

* * * *


External links

* , BSD Rlogin (1991) * * * {{Unix commands Internet protocols Internet Standards Unix network-related software