xshell能ping通虚拟机,不能连接虚拟机

1,038 阅读1分钟

没有安装openssh-server

  1. 安装shh sudo apt-get install openssh-server
  2. 重启服务 sudo service ssh restart
  3. 查看启动情况 ps -e |grep ssh

防火墙问题

  1. 查看防火墙是否关闭 sudo ufw status
  2. 关闭防火墙 sudo ufw disable
  3. 启动22端口 sudo ufw allow 22