问题描述
两台Ubuntu机器可以相互Ping通,但是ssh失败。
解决方法
SSH分客户端openssh-client
和openssh-server
- 如果你只是想登陆别的机器的SSH只需要安装
openssh-client
(ubuntu默认安装) - 如果要使本机开放SSH服务就需要安装
openssh-server
(ubuntu没有默认安装)
所以两台Ubuntu机器均安装上述客户端即可:
sudo apt install openssh-client openssh-server
成功解决!