云服务器 ECS CentOS 7 重启 sshd 服务

  1. 通过下图判断 sshd 服务是否启动。如果没有启动,执行命令 systemctl start sshd.service 启动该服务。

  2. 执行命令 systemctl restart sshd.service 重启 sshd 服务。

  3. 执行命令 systemctl enable sshd.service 设置服务开机自启。

参考 : https://help.aliyun.com/knowledge_detail/41501.html

原文地址:https://www.cnblogs.com/pengyonglei/p/7193637.html