When you administer clusters, you will eventually encounter applications that
rsh to connect between nodes.
In my place, we use Red Hat Enterprise Linux 5 (RHEL5) for the cluster nodes. In order for the application to run, we need to enable passwordless logins via rsh, in order for the Message Passing Interface & Node Management Software to work. There are a few ways to do this, this is how I did it. Security Professionals will be screaming though.
- Firstly, make sure you have installed the
[root@node01 ~]# yum install rsh-server Loaded plugins: rhnplugin, security This system is not registered with RHN. RHN support will be disabled. Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package rsh-server.i386 0:0.17-38.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: rsh-server i386 0.17-38.el5 rhel-selrepos 39 k Transaction Summary ================================================================================ Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 39 k Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : rsh-server [1/1] Installed: rsh-server.i386 0:0.17-38.el5 Complete!
- Make sure the
rsh, rlogin, rexec, xinetdare turned on and then restart
[root@node01 ~]# chkconfig rsh on [root@node01 ~]# chkconfig rexec on [root@node01 ~]# chkconfig rlogin on [root@node01 ~]# chkconfig xinetd on [root@node01 ~]# service xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ OK ]
- Edit your
/etc/securettyfile. Append the following
rsh rexec rlogin
- You’ll then need to create a
.rhostsfile in the user’s home directory, with the host names of the machines you wish to allow to connect. Note:These machines should be resolvable via either DNS or put in your
node01 node02 node03
Also, make sure the file permissions are 0600.
chmod 0600 ~/.rhosts
You should be able to rsh in now. :)