查看当前的ubuntu是否安装了ssh-server服务。默认只安装ssh-client服务。
dpkg -l | grep ssh
安装ssh-server服务
sudo apt-get install openssh-server
再次查看安装的服务:
dpkg -l | grep ssh
然后确认ssh-server是否启动了:
ps -e | grep ssh
参考文章:https://blog.csdn.net/jackghq/article/details/54974141