Search code examples
linuxshellsshdistributed-systempvm

Failed to establish ssh connection passwordless to run PVM codes


I tried to build PVM code. For that a ssh connection without password is required. I searched a lot and I found a tutorial , I implemented the same, but it didn't work.

My work:-

  1. master is jhamb.

  2. slave is naveen.

  3. Firstly I generate ssh keys on master(jhamb), by using command

    ssh-keygen -t rsa

  4. Then I copied id_rsa.pub file into slave(naveen) machine, by using command

    scp /home/jhamb/.ssh/id_rsa.pub [email protected]:/home/naveen/.ssh/authorized_keys

  5. Then I login into slave from master., by using

    ssh [email protected]

  6. But it always asking for password.

Help me to solve this problem, then only I can configure further for PVM.

Looking for your kind response.


Solution

  • Depending on the ssh version, you might have to do also this:

     - Put the public key in .ssh/authorized_keys2 
     - Change the permissions of .ssh to 700 
     - Change the permissions of .ssh/authorized_keys2 to 640