Failed to restart ssh.service: Unit not found.

1,

after modifying the sshd_config configuration file

vim /etc/ssh/sshd_config

2. Restart SSH

service ssh restart

3, the following error

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

4, reason: the above command is centos6 inside the command, centos7 need to use

systemctl restart sshd

5, the problem is perfectly solved, nice

Read More: