Hadoop: connect to host localhost port 22: Connection refused when running start-dfs.sh Hadoop: connect to host localhost port 22: Connection refused when running start-dfs.sh hadoop hadoop

Hadoop: connect to host localhost port 22: Connection refused when running start-dfs.sh


Install openssh server.

For Ubuntu command is :

sudo apt-get install openssh-server

In hadoop-env.sh file ( present in /etc/hadoop) add the following line :

export HADOOP_SSH_OPTS="-p 22"      


Configure "HADOOP_SSH_OPTS" in your hadoop-env.sh, to add any SSH CLI options you need to always be present when the Hadoop scripts use SSH. A line like 'export HADOOP_SSH_OPTS="-p "' perhaps would be what you are looking for.

Source: Interweb


Install and start openssh server. Here is the command for CentOS:

Install Open SSH server:

sudo yum -y install openssh-server openssh-clients

Start SSH server:

sudo service sshd start