The daily ramblings …

Linux HOWTO : Configuring RSH (Remote Shell)

Posted in Linux / Unix by akamal on January 30, 2007

The following tutorial requires editing of files in linux, and in this case I use vim program as an example. Refer to this blog here on how to edit a file, using vim. (vi is a program to edit file, so vi file means that I am editing the file using vim program)


First, edit /etc/hosts to add the list of hosts and their IP address.

>vi /etc/hosts/


[ip address] [domain] [machine name]

10.x.x.x machine001


To enable hosts the use of INETD
services, edit /etc/hosts/allow

> vi/etc/hosts/allow

add to file >>



Edit /root/.rhosts to add lists
of hosts that can access without password. This is extensively used by rlogin.

> vi/root/.rhosts

add to file (the machine ip or name) >>




Edit the following files listed below:

> vi/etc/xinetd.d/rsh

> vi/etc/xinetd.d/rlogin

> vi/etc/xinetd.d/rexec

find the disable value and set to no.


If you want to disable login (usually for quick access), edit the following files below:

> vi/etc/pam.d/rsh

> vi/etc/pam.d/rlogin

add to the end of line, values below (for both files above):


Now restart xinetd to enable changes, by typing:

>/etc/init.d/xinetd.d/xinetd restart


3 Responses

Subscribe to comments with RSS.

  1. asdasdffasd said, on July 19, 2012 at 8:31 pm

    dat lime green on white

  2. Pas9 said, on October 14, 2012 at 8:01 pm

    FYI, I did all of the above and then some, no luck.
    I am running CentOS 6.3 with xinetd, so rsh is a subservice of that.

    Here is what I did that finally worked:

    vi /etc/xinetd.conf

    # Comment out the lines that say “enabled” like this:
    # enabled = rsh

    # Uncomment and add any junk after “disabled”:
    disabled = anyjunk


    /etc/init.d/xinetd restart
    rsh myunsecuresystem pwd

    I still cannot rsh localhost, but who cares?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: