阿里云重启ssh

1.阿里云服务器远程连接,老是超时自动断开。修改完ssh配置文件发现重启不了。

如何解决:

  在云服务器 ECS Linux CentOS 7 下重启服务不再通过 service  操作,而是通过 systemctl 操作。

1.查看sshd服务是否启动

systemctl status sshd.service

2.启动sshd服务

systemctl start sshd.service

3.重启sshd服务

systemctl restart sshd.service

4.设置服务开启自启

systemctl enable sshd.service

 

posted @ 2018-12-11 16:58  G0mini  阅读(357)  评论(0编辑  收藏  举报