参考:
https://blog.csdn.net/ximenjianxue/article/details/105450677
用的ARM开发烧写了ubuntu16.04系统,但是ssh突然之间用不了,检查了网线以及ip都没有问题。
然后怀疑ssh出问题了,然后执行restart service ssh.service
会报错
Failed to start OpenBSD Secure Shell server之类的。
解决办法
systemctl stop ssh.service #关闭由systemctl控制的ssh启动
rm /lib/systemd/system/ssh.service #删除ssh的服务配置文件
systemctl daemon-reload #重载systemctl服务
#我不执行这个也是可以的,所以可能不复制也行
#copy sshd.init /etc/init.d //我的环境检查该目录下没有sshd.init文件
systemctl start ssh.service #重启服务