The instructions will refer to a generic user account called "hpcuser." The account name doesn't matter, this is just for convenience. In general the building and running of most software will be done as hpcuser. As root, use the following command on each system to add this generic account.
Nifty command for adding a user
Note that everything after -p on the second line and before the "hpcuser" on the last line is surrounded by back-tick character.
/usr/sbin/useradd -m -d /home/hpcuser -p \
`echo 'import crypt;print \
crypt.crypt("hpcuser","NC")' \
| python` hpcuser
MPI will require SSH password-less access for multiple machines. If you intend to network a couple of systems together to do some distributed computing, follow these instructions for SSH without a password. For simplicity, no passphrase is used when generating the DSA "key pair" though that does mean less strict authentication.
Setting up password-less SSH
On a client machine, logged in as hpcuser, the following command will create a blank password (note the two sequential single-quotes with no space for the -P parameter) in the file that contains the SSH protocol version 2 authentication identity of the user (client):
ssh-keygen -t dsa -f /home/hpcuser/.ssh/id_dsa -P ''
Then the contents of the public identity file id_dsa.pub which is read-only for hpcuser on this system will be appended into an authorization file in a corresponding .ssh directory on a server system.
On the client:
# make the directory in case it does not exist
ssh hpcuser@server mkdir /home/hpcuser/.ssh
scp id_dsa.pub hpcuser@server:/home/hpcuser/.ssh/id_dsa.pub_scratch
On the server:
cd /home/hpcuser/.ssh
cat id_dsa.pub_scratch >> authorized_keys2
rm id_dsa.pub_scratch
chmod +r+w,o-r,g+r authorized_keys2
Below this sequence is shown for client "unifex" and server "rogatien"; thus allowing hpcuser to ssh into rogatien seamlessly from unifex.
hpcuser@unifex:~/.ssh> ssh hpcuser@rogatien mkdir /home/hpcuser/.ssh
Password:
hpcuser@unifex:~/.ssh> scp id_dsa.pub hpcuser@rogatien:/home/hpcuser/.ssh/id_dsa.pub_scratch
Password:
id_dsa.pub 100% 1116 1.1KB/s 00:00
hpcuser@unifex:~/.ssh> ssh hpcuser@rogatien
Password:
Last login: Tue Jul 22 12:48:00 2008 from unifex.site
hpcuser@rogatien:~> cd .ssh
hpcuser@rogatien:~/.ssh> ls
id_dsa.pub_scratch
hpcuser@rogatien:~/.ssh> cat id_dsa.pub_scratch >> authorized_keys2
hpcuser@rogatien:~/.ssh> rm id_dsa.pub_scratch
hpcuser@rogatien:~/.ssh> chmod +r+w,o-r,g+r authorized_keys2
hpcuser@rogatien:~/.ssh> ll
total 12
-rw-r----- 1 hpcuser users 1116 2008-07-22 12:50 authorized_keys2