ssh.service和sshd.service的区别(基于Debian)
我们看一下/etc/services文件可以发现:只有ssh服务:

在Debian及其衍生版中(例如Ubuntu),使用相同的名称来启动该服务:
service ssh start/etc/init.d.sshsystemctl start ssh.service/sshd.service
以上三者可以认为是等价的
查看/lib/systemd/system/ssh.service文件还可以发现,sshd.service只是一个别名(作用应该是为了和其他发行版兼容):
[Install]
WantedBy=multi-user.target
Alias=sshd.service

浙公网安备 33010602011771号