Monday, March 4, 2013

How To Configure SSH for a RAC Installation

You want to configure ssh between 2 node RAC rac1 and rac2

To configure SSH you need to perform the following steps on each node in the cluster with operating system user you want to use for the ssh.

From RAC1:
$ su - oracle
$ cd $HOME
$ mkdir .ssh
$ chmod 700 .ssh
$ cd .ssh
$ ssh-keygen -t rsa

Now accept the default location for the key file and the default passphrase

$ ssh-keygen -t dsa

Now accept the default location for the key file and the default passphrase

$ cat *.pub >> authorized_keys.rac1

Start to copy the authorized_keys.rac1 to all the other nodes into $HOME/.ssh/

$ scp -p authorized_keys.rac1 oracle@rac2:~/.ssh

From RAC2:
$ su - oracle
$ cd $HOME
$ mkdir .ssh
$ chmod 700 .ssh
$ cd .ssh
$ ssh-keygen -t rsa

Now accept the default location for the key file and the default passphrase

$ ssh-keygen -t dsa

Now accept the default location for the key file and the default passphrase

$ cat *.pub >> authorized_keys.rac2

Start to copy the authorized_keys.rac2 to all the other nodes into $HOME/.ssh/
$ scp -p authorized_keys.rac2 oracle@rac1:~/.ssh


From RAC1:
$ cd $HOME/.ssh
$ cat *.rac* >> authorized_keys
$ chmod 600 authorized_keys

From RAC2:
$ cd $HOME/.ssh
$ cat *.rac* >> authorized_keys
$ chmod 600 authorized_keys

Now you can test the ssh connection

From RAC2 :
$ ssh rac1 date

From RAC1:
$ ssh rac2 date

No comments: