Announcement

Collapse
No announcement yet.

[SOLVED] Setup RSH

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] Setup RSH

    In some environments, you may have to setup RSH to allow scripts to run commands on remote servers. An example would be a centralized restart script (perhaps used as part of a clustered or HACMP solution) that needs to restart OTM on remote servers. While I prefer to use SSH, since it is much more secure, some environments don't allow it. Here's a quick overview on how to setup it up on a Red Hat server:

    Info:
    [hostname_1] - host that will initiate rsh commands
    [hostname_2] - host where rsh commands will be run

    1. Check that rsh is installed on [hostname_2]:
    rpm -qa | grep rsh-server
    2. If does not exist, need to install the rsh-server RPM package: rsh-server-*.rpm
    up2date --install rsh-server
    3. Next enable rsh on [hostname_2]:
    chkconfig rsh on
    4. Append the following per lines to the /etc/securetty file on [hostname_2]:
    rsh
    5. Allow certain hosts to connect via rsh to [hostname_2]:
    echo [hostname_1] >/root/.rhosts
    6. Restart the xinitd service on [hostname_1]:
    /etc/rc.d/init.d/xinetd restart
    You should now be able to test this by going to the remote host and running:
    rsh [hostname_2] -l root ls
    Hope this helps!

    --Chris
Working...
X