通过下图判断 sshd 服务是否启动。如果没有启动,执行命令 systemctl start sshd.service 启动该服务。
systemctl start sshd.service
执行命令 systemctl restart sshd.service 重启 sshd 服务。
systemctl restart sshd.service
执行命令 systemctl enable sshd.service 设置服务开机自启。
systemctl enable sshd.service
参考 : https://help.aliyun.com/knowledge_detail/41501.html