Target : Parellel Computing based on MPICH on several Mac s in Ethernet.
Environment: 5 Mac / Mac os x,one as Portal, the other 4: Node1~Node4.
Application: NAMD/ MPICH 1.2.7
The Problem: How to configure these computers to allow them ssh each other without asking password?
Step 1: inquiry info. about ssh . The ssh version combinde in Mac os X is:
OpenSSH_4.2p1, OpenSSL 0.9.7i.
Step 2: create a count in every computer with user/pass.
Step 3: log in Portal as user, then: cd ~; mkdir .ssh; cd .ssh;
user@Portal$ssh-keygen -b 1024 -t rsa1 -N ""
user@Portal$ssh-keygen -b 1024 -t rsa -N ""
user@Portal$ssh-keygen -b 1024 -t dsa -N ""
When being asked for names of files which will hold these generated keys, just hit "Enter" on keyboard. After these there should be six new files in directory ~/.ssh :
identity
identity.pub
id_rsa
id_rsa.pub
id_dsa
id_dsa.pub
Input command: user@Portal$cat *.pub > authorized_keys_portal
Step 4: repeat the same operations in Step3 on all Nodes:1~4,to get files:authorized_keys_node1~4.using scp to collect these files into Portal:
user@Node1$scp ./authorized_keys_node1 user@Portal:~/.ssh/
and merge them to one:
user@Portal$cat authorized_keys_node* >> authorized_keys_portal
user@Portal$cp authorized_keys_portal authorized_keys
Step 5: spread the key file to all nodes in directory ~/.ssh like this:
user@Portal$scp ./authorized_keys user@Node1:~/.ssh/
Step 6: now, the work has been done!
Refer to: http://blog.csdn.net/coofive/archive/2007/06/11/1647578.aspx Much Thanks to coofive!