Hi Friends,
i am trying to configure oracle RAC in my test server. for that i need to enable the ssh(if i do an ssh it should not ask for password) this is my requirement.
I followed the below step:-
[oracle@slave1 .ssh]$ chmod 700 ~/.ssh
[oracle@slave1 .ssh]$ /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
3e:fc:be:ab:87:d1:a3:f2:11:4c:22:cc:70:56:34:09
oracle@slave1.raja.com
[oracle@slave1 .ssh]$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
98:48:72:c1:21:29:98:66:a0:74:42:de:a9:8b:09:e4
oracle@slave1.raja.com
[oracle@slave1 .ssh]$
[oracle@slave1 .ssh]$
[oracle@slave1 .ssh]$ cd ~/.ssh
[oracle@slave1 .ssh]$ ls
id_dsa id_dsa.pub id_rsa id_rsa.pub
[oracle@slave1 .ssh]$ cat id_rsa.pub >>authorized_keys
[oracle@slave1 .ssh]$ cat id_dsa.pub >>authorized_keys
[oracle@slave1 .ssh]$
[oracle@slave1 .ssh]$ ls
authorized_keys id_dsa id_dsa.pub id_rsa id_rsa.pub
[oracle@slave1 .ssh]$ scp authorized_keys slave2.raja.com:/home/oracle/.ssh/
The authenticity of host 'slave2.raja.com (192.168.2.8)' can't be established.
RSA key fingerprint is d7:c1:ff:6f:ab:ec:70:d9:f9:0b:89:e3:43:a2:f1:88.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'slave2.raja.com,192.168.2.8' (RSA) to the list of known hosts.
oracle@slave2.raja.com's password:
authorized_keys 100% 1016 1.0KB/s 00:00
[oracle@slave1 .ssh]$ ssh slave2.raja.com
Enter passphrase for key '/home/oracle/.ssh/id_rsa':
Last login: Wed May 22 12:40:31 2013 from 192.168.2.3
[oracle@slave1 .ssh]$ ssh slave2.raja.com date
Wed May 22 13:59:12 IST 2013
[oracle@slave1 .ssh]$
First node is working fine. But if i try it on the second node as below it asking for the password.
[oracle@slave2 .ssh]$
[oracle@slave2 .ssh]$ chmod 700 ~/.ssh
[oracle@slave2 .ssh]$
[oracle@slave2 .ssh]$
[oracle@slave2 .ssh]$ /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
89:f7:49:0e:c9:6a:b3:7f:6e:9a:3f:08:02:78:9a:b0
oracle@slave2.raja.com
[oracle@slave2 .ssh]$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
f9:a1:fe:3a:b9:54:50:47:02:81:c7:96:9e:b4:5f:39
oracle@slave2.raja.com
[oracle@slave2 .ssh]$ ssh slave1.raja.com date
oracle@slave1.raja.com's password:
Wed May 22 20:59:03 IST 2013
[oracle@slave2 .ssh]$ ls
kindly help me to resolve this issue.
Regards,
Rajasekar.s