Building a Beowulf Cluster/Installation, Configuration, and Administration/Shared directories and SSH

Now we want to share data among computers. NFS configuration is remarkably simple (see the linux nfs faq for help). You basically have to install the package, start the nfs services, and change two files.

Let's see the example files:

on the master:/etc/export

/home/ 192.168.1.0/255.255.255.0(rw,sync,no_root_squash)
/root 192.168.1.0/255.255.255.0(rw,sync,no_root_squash)
on the slave(s):/etc/fstab

192.168.1.250:/home /home nfs rw,hard,intr 0 0
192.168.1.250:/root /root nfs rw,hard,intr 0 0

Sharing /home and /root directories password-less ssh login is simplified. For every user that need access to slaves the following achieves the goal:

> ssh-keygen -t rsa
confirm choices and leave password empty. 
> cat ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

The ~/.ssh/known_host file needs entries for each computer (e.g. by logging in to each machine once). I used option -v with the ssh command to speed up ssh changing parameters in /etc/ssh/ssh_config and /etc/ssh/sshd_config. Options that you might want to specify include protocol 2, port 22, PreferredAuthentications PublicKey, IdentityFile ~/.ssh/id_rsa. You might want to turn off checking of .ssh/known_hosts, and on the slaves you might want to ignore the host ip (CheckHostIP no), and turn off any authentication method except for public key and password. One of the fastest cipher methods is RC4 (arcfour in ssh config file)[1]

edit

See also

edit
  1. speed comparison of cypher methods with ssh