Re: systemdq
On Sat, Dec 28, 2019 at 02:57:40PM -0700, Charles Curley wrote:
> Debian (not rasbian) seems to put sshd into place at installation time.
>
> charles@hawk:~$ locate sshd.service
> /etc/systemd/system/sshd.service
> /var/lib/systemd/deb-systemd-helper-enabled/sshd.service
> charles@hawk:~$
>
> The second one has to be there. The first is optional and overrides the
> second.
I know this has been mentioned once in this gargantual sprawling
thread of lies and incompetence, but I think it needs repeating.
Debian (and probably Raspbian also, but I have no way to know for sure)
ships a unit file named
ssh.service
Note that there is no 'd' here.
Within this unit file, there is the following line:
Alias=sshd.service
This means that SOME OF THE TIME, you can get away with calling it
"sshd.service" -- for example when you try to start or stop it.
However, the Alias name does not always work. Sometimes you must
use the actual name of the unit -- for example, if you try to create
a drop-in directory under /etc/systemd/service/ to tweak it.
Please trust me: you DO NOT under any circumstances want to create a
drop-in directory using the Alias name. Bad shit happens. I found
this out the hard way.
Some of you have already observed that there's an
/etc/systemd/system/sshd.service in Debian. Let's take a closer look
at that:
lrwxrwxrwx 1 root root 31 Apr 10 2017 /etc/systemd/system/sshd.service -> /lib/systemd/system/ssh.service
It's not a file. It's a symlink, and that symlink points to the REAL
unit file with the name "ssh.service" (no "d"). This is what the Alias
line does. It creates this alternatively-named reference ("sshd.service")
that you can use to start and stop the service, but NOT to configure
it.
There's been a lot of bad advice given in this thread. It's extremely
hard to undo that. All I can do is try to point out the truth and the
falsehoods, and hope that people will update their mental caches.
And the moral of all of this is:
DO NOT POST RASPBIAN ISSUES IN DEBIAN-USER.
Reply to:
- References:
- systemdq
- From: ghe <ghe@slsware.net>
- Re: systemdq
- From: Nektarios Katakis <nektarios@mail.nektarioskatakis.xyz>
- Re: systemdq
- From: ghe <ghe@slsware.net>
- Re: systemdq
- From: Charles Curley <charlescurley@charlescurley.com>