By default, MPI uses ssh (the Secure Shell) to launch processes on remote systems. However, we have configured MPI in the Unix Lab to use an older protocol called rsh (the Remote Shell), which avoids some of the encryption/decryption overhead of ssh. To set up rsh, you need to have a text file named .rhosts in your home directory, containing the names of all the hosts in the Unix Lab. To create this file, enter the following command in your home directory:
cp /home/cs/374/rhosts .rhostsYou can verify that this worked by entering:
ls -alThis should reveal all of the files in your home directory, including .rhosts. You can then use the command:
cat .rhostsor
less .rhoststo view the contents of the .rhosts file. (You will need to use cp, ls, and cat or less frequently during this semester, so I recommend you keep a list of such commands.)
The rsh protocol requires that this .rhosts file be kept secure, so set its permissions so that you and only you can read or write to it, as follows:
chmod 600 .rhostsWith that, you (and MPI) should now be able to use rsh to launch a process on any machine in the Unix Lab without entering a password!
If you look at the name of the first machine in the file, you can test things out by entering:
rsh machineNameIf all is well, you should login to that machine (or any of the machines named in .rhosts) without having to enter your password. Assuming this worked correctly, use Ctrl-d to logout and return to your own workstation before continuing.
Once you can launch remote shells on Gold and Maroon lab machines without entering a password, you are ready to generate an MPI hosts file.
CS > 374 > Exercises > 01 > One Time Setup