LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 05-22-2013, 03:36 AM   #1
rajasekarans
LQ Newbie
 
Registered: Jan 2010
Posts: 6

Rep: Reputation: 0
ssh issue


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
 
Old 05-22-2013, 03:39 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well in what you've posted, you've not copied the key across.
 
Old 05-22-2013, 03:46 AM   #3
rajasekarans
LQ Newbie
 
Registered: Jan 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
well in what you've posted, you've not copied the key across.


Do you mean from the second node i have to perform the below step:

scp authorized_keys slave1.raja.com:/home/oracle/.ssh/

right ?
 
Old 05-22-2013, 03:47 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well yes, you still have to do that too.

Last edited by acid_kewpie; 05-22-2013 at 04:12 AM.
 
Old 05-22-2013, 03:51 AM   #5
rajasekarans
LQ Newbie
 
Registered: Jan 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
weell yes, you still have to do that too.

[oracle@slave2 .ssh]$ scp authorized_keys slave1.raja.com:/home/oracle/.ssh/
oracle@slave1.raja.com's password:
authorized_keys 100% 2032 2.0KB/s 00:00
[oracle@slave2 .ssh]$ ssh slave1.raja.com date
oracle@slave1.raja.com's password:
Wed May 22 22:25:42 IST 2013
[oracle@slave2 .ssh]$


Done it still it is asking for password.
 
Old 05-22-2013, 04:00 AM   #6
rajasekarans
LQ Newbie
 
Registered: Jan 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rajasekarans View Post
[oracle@slave2 .ssh]$ scp authorized_keys slave1.raja.com:/home/oracle/.ssh/
oracle@slave1.raja.com's password:
authorized_keys 100% 2032 2.0KB/s 00:00
[oracle@slave2 .ssh]$ ssh slave1.raja.com date
oracle@slave1.raja.com's password:
Wed May 22 22:25:42 IST 2013
[oracle@slave2 .ssh]$


Done it still it is asking for password.
Hi Chris,

i am not an Linux administrator i am an oracle DBA, please help me i dont have much idea on linux aministration.
 
Old 05-22-2013, 04:15 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I really don't think being an administrator matters at all here, and a DBA should be pretty fine with the logic at play here. You did a bunch of things to make it work in one direction, so do EXACTLY the same thing again to make it work in the other. Have you created the appropriate authorized_keys file? If you're going to keep the SAME file on both machines then clearly the file needs to contain both systems SSH public keys
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with wrapper for ssh which execute ssh. jayantkp Linux - Newbie 4 05-28-2012 04:57 AM
ssh issue moata_u Linux - Newbie 5 06-17-2011 02:49 AM
[SSH] Issue logging in [SSH & Permissions] MD3 Linux - Networking 11 12-10-2006 09:25 AM
X over SSH Issue stlpcsolutions Linux - Server 1 11-27-2006 10:08 AM
ssh issue: /usr/bin/ssh -x -oFallBackToRsh no -l WeNdeL Linux - Software 1 03-04-2003 07:17 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 11:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration