1. test each server whether ssh authentication is well connected or not
node1# ssh root@node2_name ls
node2# ssh root@node1_name ls
If password required when you insert upper command, you need to get a ssh authentication(go to second procedure)
2. Generate DSA key on both nodes as a below picture.
Then you will see the path of id_dsa and id_dsa.pub files.
(when enter, just press enter)
# ssh-keygen -t dsa or # ssh-keygen -t rsa

3. Change the directory to '.ssh', you can see the '.pub' file generated. Move this file to the other node using scp.
(if you use rsa, you just change the word from dsa to ras.)
# scp /.ssh/id_dsa_pub 상대편노드:/.ssh/id_dsa_pub.본인노드
In this picture
node1 # scp id_dsa.put node2:/.ssh/id_dsa_pub.node1
node2 # scp id_dsa.put node1:/.ssh/id_dsa_pub.node2

4. Insert tossed pub key to authorizd_keys it's own, authentication will be completed.
# cat id_dsa_pub_file-name >> authorized_keys
Excute below command at each other
node1# cat id_dsa_pub.node2 >> authorized_keys
node2# cat id_dsa_pub.node1 >> authorized_keys

5. If you complete until number 4, excute number 1 again for confirmation.
No comments:
Post a Comment