Jumat, 08 Februari 2008

UNIX Remote Commands

UNIX r Commands
This is a topic that illustrates in greater detail why UNIX is so suitable for network implementations.
UNIX designers realized long ago the significance of tightening multiple hosts into a unique working environment, where a whole network of connected hosts appears as an "equivalent host." Such an equivalency, based on mutual trusting relationships among all participating hosts, eliminates the need for individual user authentication and enables easy and powerful local and remote processing.

If you ever had the task of handling a dozen hosts in a network, you would understand this very
well. How do you execute the same (or a similar) program efficiently on a dozen hosts? And just
imagine if you should run them every day, or every hour, or even more frequently. What do you do if it is not a dozen hosts, but a hundred, or maybe five hundred, or a thousand?

It is hard to imagine the efficient maintenance of hosts in a network environment without UNIX
remote commands. UNIX remote commands are the vehicles that make each host in the network accessible in an extremely comfortable and efficient way. We will call them UNIX r commands, according to the implemented prefix "r" in their names.

What are the UNIX r−commands? Among all available commands, UNIX also provides a set of
remote commands:

rlogin Remote login provides interactive access to remote hosts. A user can reach a remote
host through the network, log in, and perform all activities regularly provided by the
the host.
rcp Remote copy allows files to be copied from or to remote systems. Its syntax is similar to
the regular copy (cp) command, except that the file path includes the name of a remote
host. It moves the files between hosts on the network using a simple command−line
interface.
rsh Remote shell passes a command to a remote host for execution. Standard output and
(remsh) standard error from the remote execution are returned to the local host.
The third command listed is not a single command at all; here we talk about a UNIX shell that
includes all UNIX commands. This is an extremely powerful and versatile way to execute any UNIX command (or set of commands) on a remote host, with full control over their execution, just as if everything is happening locally.

Some UNIX flavors, like HP−UX, use remsh for "remote shell"−ing (even the verb "remshing" is
widely implemented), because rsh (also in use) could be misinterpreted for a "restricted shell."
Although both terms are correct, the command name remsh will be used in the text that follows.

The main advantages of using UNIX r−commands is the fact that they are used in very familiar
ways, just like any other, local UNIX command is used. However, an efficient remshing is supposed to bypass the authentication on a remote host, and it could affect some security issues. Bypassingthe authentication is always a challenge for potential intruders; this means everything must be set up very carefully to avoid possible security problems. This is accomplished by establishing a so−called trusted relationship between hosts involved in remote command execution.

Trusted hosts (another term used is equivalent hosts) establish a special mutual relationship
where a certain number of users, known as trusted users receive special treatment. Once
authenticated, trusted users at one host are assumed to be allowed without any additional
authentication into another trusted host. Trusted users have direct access to remote hosts and play