When you have modified /etc/ssh/sshd_config
, you may execute systemctl restart sshd.service
to reflect the change. At least in my environment, also, systemctl restart ssh.service
works. And systemctl --all list-units ssh*
tells me there isn't any service with the name sshd.service
. Then why is sshd.service
used wide and actually valid?
(I know the name of ssh daemon is sshd
but this is not the reasonable reason, I think.)
I executed the following commands on linux mint 19
(ubuntu
-base) and volumio 2
(raspbian
-base), both of which are based on debian
.
systemctl restart sshd.service; echo $? #=> 0
systemctl restart ssh.service; echo $? #=> 0
systemctl --no-legend --all list-units ssh* #=> only ssh.service exists
Failed to restart ssh.service: Unit ssh.service not found
, unless your distro symlinks it.