0

Perhaps I am missing out something very basic, but it is just not working out for me...

Objective is to setup passwords authentication (using ssh) between the two systems involved. The two systems involved are -

one real box (mac - alias master) and one running in virtual box (cloudera VM - running centOS - alias slave).

Steps performed so far -

On Mac

  1. ssh-keygen -t rsa
  2. ssh-copy-id cloudera@slave

On VM

  1. ssh-keygen -t rsa
  2. ssh-copy-id raghav@master

When I do ssh cloudera@slave from mac (master) it doesn't work, i.e. asks me a password. However, when I do ssh raghav@master from vm (slave) it works as expected, lets me in without password.

What am I missing.. please help..

6
  • Check the permissions on your password key file. Must be read only for user.
    – WilliamKF
    Commented May 13, 2015 at 19:43
  • thanks WilliamKF for the idea; did a chmod 400 * on both systems .ssh directory.. still the same behaviour
    – Raghav
    Commented May 13, 2015 at 19:47
  • The first command I run when I hit ssh issues: 'chmod 700 ~/.ssh && chmod 600 ~/.ssh/* && chmod 644 ~/.ssh/authorized_keys'. Note: ~ is the home dir of the user. If you're performing it for another user, replace ~ with '/home/username'. Commented May 13, 2015 at 19:50
  • Thanks for quick responses. @Alex - I followed your suggestion too, still the same behaviour :(
    – Raghav
    Commented May 13, 2015 at 19:57
  • Ensure your public key is in the authorized_keys file on the target machine. Ensure /etc/ssh/sshd_config has these settings: RSAAuthentication yes, PubkeyAuthentication yes, #AuthorizedKeysFile %h/.ssh/authorized_keys. I also have UsePAM to no, but that's not necessary. Commented May 13, 2015 at 20:14

0

You must log in to answer this question.

Browse other questions tagged .