报的这样的错
ssh: connect to host localhost port 22: Connection refused
按照hadoop官网上的操作
$ ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ chmod 0600 ~/.ssh/authorized_keys
还是不能连接
查看ubuntu机器上的ssh应该是只有ssh远程访问的客户端,而没有ssh-server,故安装openssh-server
$ sudo apt-get install openssh-server
搞定
$ ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:7FTkHoAyQ9yLqfLXI+GOOz/Ej7uBe1vJldjpsej+OuM.
Are you sure you want to continue connecting (yes/no)? no