I have installed Hadoop and SSH on my laptop. \"ssh localhost\" works fine. After formatting HDFS, I tried to start hadoop.
munichong@GrindPad:~$ sudo /usr/
As in above case munichong is a user (munichong@GrindPad)
In my case: Login as hduser
Firstly, remove the directorysudo rm -rf ~/.ssh
Use to re-generate /.ssh directory with default setting:
[hduser@localhost ~]$ ssh-keygen
Here we do copy and paste the content of id_rsa.pub into authorised_keys file created by using above command)
[hduser@localhost ~]$ sudo cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[hduser@localhost ~]$ chmod -R 750 ~/.ssh/authorized_keys
[hduser@localhost ~]$ ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established. RSA key fingerprint is 04:e8:80:64:dc:71:b5:2f:c0:d9:28:86:1f:61:60:8a. Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts. Last login: Mon Jan 4 14:31:05 2016 from localhost.localdomain
[hduser@localhost ~]$ jps
18531 Jps
[hduser@localhost ~]$ start-all.sh
All daemons start
Note: Sometime due to logs files other problem occur, in that case remove only dot out (.out) files from /usr/local/hadoop/logs/.