Manually Setup Passwordless SSH User Equivalence for RAC Nodes

In GI/RAC environment, passwordless SSH user equivalence is a prerequisite for Grid user and RAC user.

Here is an example of how to manually set up passwordless SSH user equivalence for multi-nodes cluster servers.

a) Check SSH is running.

$pgrep sshd

b) Login as grid or oracle user, and create .ssh directory under user HOME directory, and set right permission for this directory.

$ mkdir ~/.ssh
$ chmod 700 ~/.ssh

c) Run below command to generate DSA public and private key. press Enter for all inputs. You can use same command to generate RSA ones.

$ /usr/bin/ssh-keygen -t dsa 
$ cd .ssh
$ ls -ltr
-rw-r--r-- 1 grid oinstall 398 Sep 14 12:06
-rw------- 1 grid oinstall 1675 Sep 14 12:06 id_dsa

d) Repeat steps a) through c) on other nodes .

e) Add the DSA public key to the authorized_key file on node1

$ cat >> authorized_keys
$ ls

f) Copy authorized_key file to node 2 :

$ scp authorized_keys racnode2:/home/grid/.ssh/

g) Add public key of user grid on node 2 to file authorized_key:

$cat >> authorized_keys

h) Copy authorized_key file back to node 1 :

$ scp authorized_keys racnode1:/home/grid/.ssh/

I) Test the user equivalency:

$ssh racnode1 date
$ssh racnode1-vip date
$ssh racnode2 date
$ssh racnode2-vip date

2 thoughts on “Manually Setup Passwordless SSH User Equivalence for RAC Nodes”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: