On Client side:
- open configuration file
- here look for
- make sure
password comes after
publickey and not viceversa
In my case
password was written before
publickey, so ssh would prompt me for password even though I had copied my pub_key onto server.
This problem can be found out easily using verbose:
ssh -v compute@compute1
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
As you can see
password is chosen before trying to use publickey.
/etc/ssh/ssh_config by moving
Now I can login without being prompt for pwd.