This is a short one for beginners. What do you have to do to make password-less SSH connections work?
Imagine that you have two cluster nodes(node1, node2), that need to talk to each other via SSH. The Veritas Cluster installation requires this functionality and will not start until it has been applied to all of the cluster nodes.
1. Login to node1 as the user that should be able to login to node2.
ssh-keygen -t rsa
Generating public/private rsa key pair. Enter file in which to save the key (/home/juergen/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/juergen/.ssh/id_rsa. Your public key has been saved in /home/juergen/.ssh/id_rsa.pub. The key fingerprint is: a4:33:48:28:25:bd:3c:6e:23:21:7a:fc:3a:cc:20:15 juergen@node1
3. A new private/public key pair has been created. Copy the public key to the second node.
scp ~/.ssh/id_rsa.pub node2:/home/juergen/node1.key
4. Login to node2 with the same username that you’ve used on node1.
5. Redo steps 2-3 accordingly.
5. Add the public key of node1 to the list of trusted host keys.
cat ~/node1.key >> ~/.ssh/authorized_keys
6. Check that the key exists in the authorized_keys file.
7. Remove the copy of node1’s public key from node2.
rm -f ~/node1.key
8. Redo steps 5-7 on node1 accordingly.
9. Check that it works.