prompting for passwords even i configured ssh password less authentication

There are two servers :

  1. Site
  2. Testing
    from site server i want to connect testing server with ssh password less authentication.

i generated public and private keys with ssh-keygen -t rsa on site server.

cat id_rsa >> authorized_keys
cat id_rsa.pub >> authorized_keys

i appended id_rsa.pub ( public key site server ) to authorized_keys ( testing server ) with below command .

ssh oracle@testing.fgho.com "cat >> ~/.ssh/authorized_keys" < ~/.ssh/id_rsa.pub

am i missing some point in performing procedure for ssh password less authentication ?

because it prompts for passwords agaian and again

one thing i want to tell u that i am doing all above procedure with oracle user .

Check the permissions on the "Testing" server .ssh directory (should be 500 or 700) and the authorized_keys file (400 or 600)

on testing server permissions are as follows :

-rw-r--r-- 1 oracle oinstall  405 Oct  9 09:25 id_rsa.pub
-rw------- 1 oracle oinstall 1675 Oct  9 09:25 id_rsa
-rw-r--r-- 1 oracle oinstall 2486 Oct  9 09:27 authorized_keys
-rw-r--r-- 1 oracle oinstall  817 Oct  9 09:57 known_hosts

And they're wrong. What about the .ssh directory itself? drwxr-xr-x? That too would be wrong.

i could not find permissions at .ssh directory on testing server.

but now i did
chmod 700 .ssh

do i set chmod 600 authorized_keys ??

Yes.

You can use the -a flag of ls to see 'hidden files'.

Or, in this case, just:

ls -ld ~/.ssh

ls -ald .ssh/
drwx------ 2 oracle oinstall 4096 Oct 9 09:25 .ssh/

What are the permissions of your home dir itself? 777 will stop it from working for security reasons...

on testing server my home permissions are as follows :

pwd
/home/oracle/.ssh
[oracle@testing .ssh]$ ls -ltr /home/
drwxrwxrwx 46 oracle oinstall  12288 Oct  8 16:11 oracle

Yes, 777 will stop it from working.

It shouldn't be 777 anyway. Try 750

I changed permissions to

chmod 750 /home

now i can connect testing server from site server without password. ( thanks a lot for ur kind support ).

one thing i want to ask that changing /home/oracle permissions to 750 will result in something abnormal functionality in running oracle e-buiness suite application ??

---------- Post updated at 12:58 PM ---------- Previous update was at 12:35 PM ----------

i have to do the work i done above on my production server.

i am getting following error :

chmod 750 /home/
chmod: changing permissions of `/home/': Operation not permitted

to your first question: No.

/home is (should be) owned by root, not oracle.

there was a directory shared via samba (/home/oracle/pfl_opm)

now this directory is not accesses via samba after changing above permission from 777 to 750.

What i do now ?

---------- Post updated at 03:53 PM ---------- Previous update was at 03:43 PM ----------

these are contents from samba :

[opm]
        path = /home/oracle/pfl_opm
        writeable = yes
;       browseable = yes
        valid users = opm

this directory is not going to access from samba after making above changes.

Change /home/oracle to 755

Changing /home to 750 is not a good idea. 755 for that is normal.

after making chmod 755 /home/oracle

[opt]
        path = /opt
        writeable = yes
;       browseable = yes
#       guest ok = no
        valid users = oracle

opt folder is not going to access now.

---------- Post updated at 04:51 PM ---------- Previous update was at 04:15 PM ----------

how i can work with ssh password less authentication and i have to access these samba directories with their respective users as well.

please guide me.

Hi Team,
I have same problem but i am using "dsa" key and modified permissions to all folders as you mentioned, except /home because i dont have permissions to modify as 755.

Please suggest me futher process.

Regards,
Harris