Berkeley r-commands facts for kids
Developer(s) | Computer Systems Research Group at the University of California, Berkeley |
---|---|
Initial release | June 1981 |
Operating system | Unix and Unix-like |
Type | Command suite |
License | BSD |
The Berkeley r-commands are a group of computer programs that let users on one Unix computer connect to or send instructions to another Unix computer. They do this using a special way of communicating over a computer network called TCP/IP. These commands were created in 1982 by a team at the University of California, Berkeley.
These r-commands were added to a version of the Unix operating system called Berkeley Software Distribution (BSD). They first appeared in BSD version 4.1. Some of the programs in this group include:
(for copying files remotely), rcp
(for running programs remotely), rexec
(for logging in remotely), and rlogin
(for using a remote command line). Other commands are rsh
, rstat
, and ruptime
.rwho
The r-commands were very important and became a common way for Unix systems to work together. However, as more people started using the Internet, a big problem appeared: these commands were not very secure. Because of this, newer and safer ways to connect, like Secure Shell (SSH), started to replace them around 1995.
Service | Port | Transport | Refs | |
---|---|---|---|---|
Client | Daemon | |||
rcp | rshd | 514 | TCP | |
|
rexecd | 512 | TCP | |
rlogin | rlogind | 513 | TCP | |
rsh | rshd | 514 | TCP | |
rstat | rstatd | UDP | ||
ruptime | rwhod | 513 | UDP | |
rwho |
Contents
Understanding r-commands
The r-commands let computers talk to each other over a network. They use specific rules, or "protocols," to send information back and forth. For example, when you use
to connect to another computer, your computer sends your username and other details. The other computer then checks if you are allowed to connect. If everything is correct, the connection is made.rlogin
These commands often use special files to decide who can connect. Two important files are
and /etc/hosts.equiv
.$HOME/.rhosts
- The
file applies to everyone on a server.hosts.equiv
- The
file is for a single user in their home folder..rhosts
These files list which other computers or users are allowed to connect without needing a password. For example, a file might say:
host1
host2 user_a
-host3
This means all users from "host1" can log in. Only "user_a" from "host2" can log in. No users from "host3" can log in.
Main r-commands
Let's look at some of the main r-commands and what they do.
rlogin: Remote Login
lets you log in to another computer over a network. It uses a specific network "doorway" called TCP network port 513. Once you're logged in, it's like you're sitting right in front of that remote computer. You can type commands and see the results.rlogin
This command is similar to Telnet, another tool for remote connections. However,
is mainly used for Unix-like computers. It works with a special program called a daemon (rlogin
) on the computer you're connecting to.rlogind
rsh: Remote Shell
lets you run commands on a remote computer without fully logging in. It opens a "shell," which is like a text-based window where you can type commands. Whatever you type is sent to the remote computer, and the results are sent back to your screen.rsh
uses TCP port 514 for sending and receiving most information. It also uses a different port for error messages. The program that listens for rsh
requests on the remote computer is called rsh
.rshd
rexec: Remote Execution
Like
, rsh
also lets you run commands on a remote computer. The main difference is that rexec
requires you to provide a username and password. However, it sends this information without encryption, which means it's not very secure. rexec
uses TCP port 512. The program that handles rexec
requests on the remote computer is called rexec
.rexecd
rcp: Remote Copy
is used to copy files or entire folders between computers over a network. You can copy:rcp
- From your computer to a remote computer.
- From a remote computer to your computer.
- From one remote computer to another remote computer.
The way you use
is similar to the regular cp command for copying files on your own computer. But with rcp
, you add the name of the remote computer to the file path. For example:rcp
rcp my_file.txt remote_computer:~/documents/my_file.txt
This command copies "my_file.txt" from your computer to the "documents" folder on "remote_computer". Be careful, because
will overwrite a file if one with the same name already exists, without asking you first. Like rcp
, rsh
uses TCP port 514.rcp
rwho: Who is Online Remotely
Just like the who command shows who is logged into your computer,
shows you who is logged into all the other Unix computers on your local network. A special program called rwho
keeps track of this information on all the networked computers.rwhod
rstat: Remote Statistics
gives you information about how well a remote computer's core system (its "kernel") is performing. It provides statistics about its activity.rstat
ruptime: Remote Uptime
The
command tells you how long your computer has been running since its last restart. Similarly, uptime
asks all computers on your local network for their uptime reports. It then shows you how long each computer has been running. If a computer doesn't respond, ruptime
will tell you that it's "down." This information is also collected and stored by the ruptime
program, which rwhod
also uses.rwho
Security Concerns
The r-commands that require you to log in (like
, rcp
, rexec
, and rlogin
) have some serious security weaknesses:rsh
- No Encryption: All information, including your passwords, is sent across the network without being scrambled. This means someone could easily "listen in" and steal your passwords.
- .rhosts File Issues: The
file is meant to allow connections without a password. However, it relies on the remote computer's name and IP address, which can be faked. This makes it easy for someone with bad intentions to gain access. Many system administrators do not allow these files to be used because of this risk..rhosts
- Trusting the Client: The r-commands partly trust the connecting computer to be honest about who it is. A hacker could pretend to be a trusted computer and gain access.
- Network File System Risks: If user folders are shared across the network using something like Network File System, a fake
file could be placed there. This means any security problem with shared folders can also affect r-commands..rhosts
Because of these problems, the r-commands are not used much anymore. Many modern Unix and Linux systems don't even include them by default. Most networks that used to rely on
and Telnet have now switched to much safer options like SSH.rlogin
See also
In Spanish: Rlogin para niños
- List of Unix commands