| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Berkeley Remote Shell (rsh) The Berkeley remote login command (rlogin) allows a user to easily access a remote UNIX host over a TCP/IP internetwork. A user would normally use rlogin when he or she needs to log in to a server to perform a number of tasks. There are some situations, however, where a user needs to only enter one command on a remote host. With rlogin, the user would have to log in to the host, execute the command, and then log back out again. This isnt exactly an earth-shattering amount of inconvenience, especially when the correct configuration files are set up to allow automatic login. Over the course of time, however, all the extra logging in and out can become tedious. As a convenience, a variation of rlogin was created called remote shell (rsh), which allows a user to access a remote host and execute a single command upon it without requiring the login and logout steps.
The rsh command is based on rlogin and really works in much the same way, except that it is oriented around executing a command rather than establishing a persistent login session. The server process on the remote host is usually called rshd (remote shell daemon) and listens for incoming rsh requests. When one is received, the user is logged in through the same mechanism as rlogin. The command is then run on the remote host and the user is automatically logged out. rsh is most useful when automatic login is employed, so that the program can be run without the need for the user to enter a login name or password. In that case, it is possible to have programs use rsh to automatically run commands on remote hosts without the need for human intervention, which opens up a number of possibilities for UNIX users. The normal UNIX user interface concepts of standard input (stdin), standard output (stdout) and standard error (stderr) also apply to rsh, so you can use it to execute a remote command and redirect the output to a local file. For example, this command would let a user get a listing of his or her home directory on the server <somehost> and store it in the local file remotelist: rsh <somehost> ls -l >remotelist
Since rsh is based on rlogin, all of the concerns that apply to rlogin are also relevant here, especially with regard to security. (We no more want an unauthorized user running commands on our servers than logging in to them!) As with rlogin, newer versions of rsh support more advanced authentication options than the original software. Also, just as slogin is a newer, more secure version of rlogin, there is a program called ssh (secure shell) that replaces rsh on many systems.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. |