报的这样的错
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

本文介绍了如何解决在尝试使用SSH连接到本地主机时遇到的“Connection refused”错误。通过检查Ubuntu系统上的SSH配置并安装openssh-server来实现本地SSH连接。
2260

被折叠的 条评论
为什么被折叠?



