Why am I still getting a password prompt with ssh with public key authentication?

Just try these following commands in your client or laptop, PC.

  1. ssh-keygen
    Press Enter key till you get the prompt

  2. ssh-copy-id -i root@server_ip_address
    (It will once ask for the password of the server)

  3. ssh root@ip_address
    Now you should be able to login without any password