Greetings,
I have searched for a solution to this problem with no luck:
I am trying to install hadoop on my Ubuntu machine. For that to happen, I need to setup keys so that the localhost can ssh into the same machine (inception?)
I currently ssh into the machine without needing to use a passphrase.
I have setup new keys so that hadoop can work on the same machine. I used the following commands:
Code:
sudo ssh-keygen -t dsa
sudo cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
all files in /.ssh folder have an 600 chmod permission
however, if I try to ssh into localhost it prompts:
Code:
Permission denied (publickey).
if I run sudo ssh localhost -v, the last lines are:
Code:
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Offering DSA public key: /root/.ssh/id_dsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /root/.ssh/id_ecdsa
debug1: No more authentication methods to try.
Permission denied (publickey).
I have to mention that I have created several keys and erased some others in the authorized_key file, leaving only the one that lets me ssh into the machine.
I would like to know how to get rid of this Permission denied (publickey) error.