Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Searchable, convenient, complete TCP/IP information.
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7)
      9  TCP/IP Key Applications and Application Protocols
           9  TCP/IP Interactive and Remote Application Protocols
                9  Berkeley Remote ("r") Commands

Previous Topic/Section
Berkeley Remote Login (rlogin)
Previous Page
Pages in Current Topic/Section
1
Next Page
Other Berkeley Remote ("r") Commands (rcp, ruptime, rwho)
Next Topic/Section

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 isn’t 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.

Note: “Shell” is the standard term used in UNIX to refer to the user interface that accepts commands from the user and displays output on the screen.


rsh Operation

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.

Automated Use of rsh by Programs

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

Key Concept: The remote shell or rsh command is similar to the Berkeley rlogin command, but instead of opening a login session on a remote host, it executes a single, user-provided command. rsh can be helpful for users who need to perform a quick operation on a remote host, and can also be employed by other programs to automate network tasks.


rsh Security Concerns and ssh

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.

Note: On some systems, if rsh is entered without a command specified to execute, then an interactive remote session is established, exactly as if the rlogin command had been entered instead of rsh.



Previous Topic/Section
Berkeley Remote Login (rlogin)
Previous Page
Pages in Current Topic/Section
1
Next Page
Other Berkeley Remote ("r") Commands (rcp, ruptime, rwho)
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



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.