194
Configure SSH keys connectivity for RAC Environment Oracle
- Install the yum package. (Run on both nodes)
yum install openssh-server
- Start the SSH service. (Run on both nodes)
service sshd start
- Configure SSH for start on reboot.(Run on both nodes)
chkconfig sshd on
- Enable 22 port from firewall or disable firewall settings. (Run on both nodes)
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
Or
systemctl stop firewalld
systemctl disable firewalld
- Run this command to generate key in .ssh hidden folder at home location. (Run on both nodes)
su - oracle
mkdir ~/.ssh
chmod 700 ~/.ssh
/usr/bin/ssh-keygen -t rsa
-
Two files are created as RSA public key id_rsa.pub file and the private key id_rsa file.
-
Copy the public key into authorization key.
cat id_rsa.pub >> authorized_keys
- copy these authorized_keys file to node 2 with scp command.
scp authorized_keys rac2.localdomain:/home/oracle/.ssh/
- Put the other node id_rsa.pub in authorized_keys file and scp back to node 1.
cat id_rsa.pub >> authorized_keys
scp authorized_keys rac1.localdomain:/home/oracle/.ssh/
- Test the authorized_keys file.
Note: first time it will ask for yes then type YES. From next time it will not prompt.
ssh rac1 date
ssh rac2 date
ssh rac1.localdomain date
ssh rac2.localdomain date