在centos7下重啟服務不再是 service 服務名稱 動作 這樣的方式的.而是:
systemctl 動作 服務名.service
1. 查看sshd服務是否啟動了.
systemctl status sshd.service
看到的這樣的信息就可以確定是啟動了.
2. 如果沒有啟動,則需要啟動該服務:
systemctl start sshd.service
3. 如果需要重啟sshd服務可使得
systemctl restart sshd.service
4. 設置為開機啟動可使用:
systemctl enable sshd.service