在雲服務器 ECS Linux CentOS 7 下重啓服務不再通過 service 操作,而是通過 systemctl 操作。 操作說明如下:
1. 查看 sshd 服務是否啓動:
看到上述信息就可以確定是啓動了。
2. 如果沒有啓動,則需要啓動該服務:
systemctl start sshd.service
3. 重啓 sshd 服務:
systemctl restart sshd.service
4. 設置服務開啓自啓:
systemctl enable sshd.service