RSH on Windows 2003 R2 – Part I

Installing and configuring RSH server on Windows box has always been an area of special interest for me; especially because I have seen many issues and the troubleshooting of them has always involved unstructured steps. In this Part I; I am trying to capture the simplest possible steps that have been tested for considerable times and proved to be desirable and sufficient for such scenario. The steps mentioned below; is primarily based on Windows 2003 R2.

Once we install “Subsystem for UNIX-based applications” and “Utilities and Software Development Kit (SDK) for Subsystem for UNIX-based Applications” we can proceed for configuring RSH server on the Windows box.

On windows box:

Open C or K shell and execute the following the commands:

Move to /etc directory

cd /etc

 Open a file called hosts.equiv

vi hosts.equiv

Put the entries like

<Name or IP address of the UNIX client><TAB><UserName of a UNIX user>

For example:     user1

            Close and save the file

      Change the permission to read only to everyone

                  chmod 444 /etc/hosts.equiv

            Open the inetd.conf file and remove the comment entries for the following files:

shell   stream  tcp     nowait  NULL    /usr/sbin/in.rshd       in.rshd -a

exec    stream  tcp     nowait  NULL    /usr/sbin/in.rexecd     in.rexecd

login   stream  tcp     nowait  NULL    /usr/sbin/in.rlogind    in.rlogind -a

            Save and close the file

            Restart the inet service as

cd /etc/init.d

./inet stop

./inet start                   

We are pretty much done with the essential steps on Windows box; let’s login from the UNIX box as the user that we specified in the hosts.equiv file

For example; login as user1 from

Now execute the command as:

rsh <Windows box IP or Name> <any UNIX command> (assuming user1 is also a valid NON ADMIN user on the Windows box)

In case user1 is not a valid user on the Windows box modify the above command as:

rsh -l user1 <Windows box Ip or Name> <any UNIX command>

Note that:

hosts.equiv file only works with a NON ADMIN user

Based on my experience the following steps seem to be helpful in certain scenarios; particularly in such cases when the above mentioned steps results in “Permission denied” error.

Open windows explorer and go to C:\WINDOWS\system32\drivers\etc

Open hosts file and add the entry for the UNIX box as

<IP address of the UNIX client> <TAB><name of the UNIX box>

Save and close the file

Skip to main content