Friday, March 25, 2011

Steps to create auto login of ssh without typing passwords for oracle user in AIX


Ability for ORACLE user to login with ssh to peer RAC instance is a prerequisite for RAC installation. Verify that ssh daemon is configured on node1 and node2 before proceeding with steps listed here. Steps documented here was tested on 2 node RAC cluster on AIX 6.1 with OpenSSH

Perform steps 1, 2 and 3 on node1 and node2

1) cd /home/oracle/.ssh

2) Generate public keys for the oracle user as follows
$ ssh-keygen -t rsa

This will generate a private (id_rsa) and public file (id_rsa.pub)

3) Copy id_rsa.pub to nodename_username.pub format
Example: cp id_rsa.pub node1_oracle.pub

4) Transfer this file to the node2 to which you need to configure auto login with ssh.
So in my case, I transferred it to tstndc02 using sftp

5) Now on node2, execute following steps,
$ cd /home/oracle/.ssh
$ cat node1_oracle.pub node2_oracle.pub >>authorized_keys

6) As we want to perform auto login from both nodes, we need to share authorized_keys which we created in step 5 to node1.
$ scp authorized_keys oracle@node1:/home/oracle/.ssh/

7) Now you should be able to login from node1 to node2 with ssh without password. To complete this process, please test following steps on node1 and node2 and accept the security keys if it prompts (It will ask you only first time)

$ ssh oracle@localhost
$ ssh oracle@node1
$ ssh oracle@node1.domainname.com
$ ssh oracle@node2
$ ssh oracle@node2.domainname.com

Try ssh to localhost, node1, node2, package name etc to make sure all combinations are working without typing password. If you get PNRG is not seeded error, Contact Unix SA and ask him to change permission for /dev/random and /dev/urandom

You could download same document in pdf  from Google Docs. Here is the link

No comments:

Post a Comment