Mac Cluster SSH With no Password

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!
 

        

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值