ssh for installing Oracle RAC
example: check it on both nodes
[oracle@ol7_121_rac1 ~]$ id
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
[oracle@ol7_121_rac2 ~]$ id
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
Follow as oracle perform the following on each of the nodes of the RAC:
1. cd $HOME
2. mkdir ~/.ssh
3. chmod 700 ~/.ssh
4. /usr/bin/ssh-keygen -t rsa
5. /usr/bin/ssh-keygen -t dsa
On Node 1:
1. cd $HOME/.ssh
2. cat id_rsa.pub >> authorized_keys
3. cat id_dsa.pub >> authorized_keys
4. Copy the authorized_keys file to the node 2. scp authorized_keys ol7_121_rac2:/home/oracle/.ssh
On Node 2:
1. cd $HOME/.ssh
2. cat id_rsa.pub >> authorized_keys
3. cat id_dsa.pub >> authorized_keys
4. scp authorized_keys ol7_121_rac1:/home/oracle/.ssh
On each node, enter the following commands to start the SSH agent, and to load the SSH keys into memory:
$ exec /usr/bin/ssh-agent $SHELL
$ /usr/bin/ssh-add
At the prompt, enter the pass phrase for each key that you generated.
* Now perform a ssh between all the nodes including the node-priv hostnames as well. Check to make sure that ssh is configured well without prompting for the password (on both the nodes):
#
Can you make sure your sshd_config file as following entries uncommented?
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
If not then edit and uncomment them. Restart the ssh once you make these changes.
Restart OpenSSH server
Type the following command:
#/etc/init.d/ssh restart
Add the entries to the .bashrc file as oracle user
#
if [ -t 0 ]; then
stty intr ^C
fi
#
Try creating a symbolic link:
ln -s /usr/bin/ssh /usr/local/bin/ssh
ln -s /usr/bin/scp /usr/local/bin/scp
After you set the dsa and rsa keys in to the authorized_keys file.
From NODE 1
ssh ol7_121_rac1 date
ssh ol7_121_rac2 date
ssh ol7_121_rac1.localdomain date
ssh ol7_121_rac2.localdomain date
ssh ol7_121_rac1-priv date
ssh ol7_121_rac2-priv date
ssh ol7_121_rac1-priv.localdomain date
ssh ol7_121_rac2-priv.localdomain date
From NODE 2
ssh ol7_121_rac1 date
ssh ol7_121_rac2 date
ssh ol7_121_rac1.localdomain date
ssh ol7_121_rac2.localdomain date
ssh ol7_121_rac1-priv date
ssh ol7_121_rac2-priv date
ssh ol7_121_rac1-priv.localdomain date
ssh ol7_121_rac2-priv.localdomain date