ssh连接localhost被拒绝的解决方法

版权声明:个人博客网址 https://29dch.github.io/ 博主GitHub网址 https://github.com/29DCH,欢迎大家前来交流探讨和fork! https://blog.csdn.net/CowBoySoBusy/article/details/82895793

在终端输入ssh localhost
报的这样的错
ssh: connect to host localhost port 22: Connection refused
按照hadoop官网上的操作配置好ssh以后还是报这个错误
查看Linux机器上的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:XsfMvgjvI+PYquEdgGRRHg6AGAyPVong/vLtGMzxWZk.
Are you sure you want to continue connecting (yes/no)? no

在这里插入图片描述

然后就搞定了.

猜你喜欢

转载自blog.csdn.net/CowBoySoBusy/article/details/82895793
今日推荐