自学内容网 自学内容网

KubeSphere安装时候报22端口连接不上的错误

使用KubeKey在Linux机器上以单节点模式安装KubeSphere和Kubernetes/K3时候报错误:

error: Pipeline[CreateClusterPipeline] execute failed: Module[GreetingsModule] exec failed:
failed: [LAPTOP-R028MMAA] failed to connect to 172.26.246.173: could not establish connection to 172.26.246.173:22: dial tcp 172.26.246.173:22: connect: connection refused

如果你的服务器系统没有安装openssh-server或者ssh服务没有启动,就会报这个错误,解决方法:

  • 确认openssh-server是否已安装,在基于Debian的系统(如Ubuntu)上,使用sudo apt-listfiles | grep openssh-server检查安装状态。在基于RPM的系统(如CentOS)上,使用rpm -q openssh-server检查安装状态。

  • 如果没有安装,安装openssh-server

    在Debian/Ubuntu上,使用sudo apt-get install openssh-server安装。

    在CentOS上,使用sudo yum install openssh-server安装。
  • 如果已经安装,确认服务名称是否正确:

    在某些系统中,可能服务的名称不是ssh.service,而是sshd.service,请检查服务的确切名称:systemctl list-units --type=service | grep ssh。如果服务名称正确,尝试重新启动服务,例如sudo systemctl start sshd.service

原文地址:https://blog.csdn.net/jialiang_chen/article/details/140697518

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!