天天看點

阿裡雲重新開機ssh

1.阿裡雲伺服器遠端連接配接,老是逾時自動斷開。修改完ssh配置檔案發現重新開機不了。

阿裡雲重新開機ssh

如何解決:

  在雲伺服器 ECS Linux CentOS 7 下重新開機服務不再通過 service  操作,而是通過 systemctl 操作。

1.檢視sshd服務是否啟動

systemctl status sshd.service      
阿裡雲重新開機ssh

2.啟動sshd服務

systemctl start sshd.service      

3.重新開機sshd服務

systemctl restart sshd.service      

4.設定服務開啟自啟

systemctl enable sshd.service      

安安靜靜變優秀。 --胖丫