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/

add:

[ip address] [domain] [machine name]

10.x.x.x local@local.com machine001

 

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

> vi/etc/hosts/allow

add to file >>

10.1.1.1

machine001

 

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) >>

clsn01

machine001

 

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):

no_login.so

securetty.so

rhosts_auth.so

 

Now restart xinetd to enable changes, by typing:

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

Advertisements

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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: