1、在修改了sshd_config配置文件以后

vim /etc/ssh/sshd_config

2、重启ssh

service ssh restart

3、出现以下报错

Redirecting to /bin/systemctl restart ssh.service
Failed to restart ssh.service: Unit not found.

4、原因:以上命令都是centos6里面的命令,在centos7需要用

systemctl restart sshd

5、问题完美解决,nice
————————————————

原文链接:https://blog.csdn.net/weixin_44347111/article/details/105944073

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐