• SEND_BUTTPLUG_PICS@lemmy.zip
    link
    fedilink
    arrow-up
    2
    ·
    18 hours ago

    Is sshd really not part of systemd? I seem to remember needing to run systemctl restart sshd after making changes to the sshd config file but it’s been a while since I’ve done that.

    I also use systemd to automatically start plex, sonarr, radarr, transmission, and maybe a few other things as well and if they need to be restarted I’d use a similar command on Ubuntu. Or I’d run systemctl status plexmediaserver to see if it was running correctly.

    I’m not an expert though so maybe I’m doing it wrong or using the wrong terminology.

    • rtxn@lemmy.worldM
      link
      fedilink
      arrow-up
      8
      ·
      15 hours ago

      Systemd, through the systemctl command, only manages the services. The service itself is defined in a unit file, and it can come from any source, even written manually. The unit file is a text file that describes what the service is, what commands or programs should be executed when it starts or stops (for sshd it’s /usr/bin/sshd -D), what other services or conditions are required (e.g. multi-user.target after the OS has entered multi-user mode), and much more.

      When a package installs a unit file, it will be installed to a subdirectory in /usr/lib/systemd, typically user or system, and when it is enabled, it will be symlinked to a subdirectory in /etc/systemd.

      OpenSSH itself, which provides sshd on most systems, is developed by the OpenBSD team and ported to other OSes by the OpenSSH Portability Team.

      • SEND_BUTTPLUG_PICS@lemmy.zip
        link
        fedilink
        arrow-up
        3
        ·
        14 hours ago

        That makes a lot of sense. I actually wrote my own unit files for Jackett and to autostart a virtual machine and moved them into multi-user target wants using the enable command. I guess my thought was that by adding the unit file to systemd it made the program part of systemd in a way but now that I think more about it, saying any of these programs are part of systemd doesn’t actually make sense. Just because sshd came pre-installed with Ubuntu doesn’t make it part of systemd any more than plex is part of systemd.

        Thanks for helping me understand!

    • Asparagus0098@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      4
      ·
      16 hours ago

      Is sshd really not part of systemd?

      Yes, it’s not a part of systemd. By running systemctl restart sshd you are just restarting the sshd systemd service. Systemd service files for things like ssh and transmission come with their respective packages.

      You can see what I mean here. The openssh-server package for Ubuntu comes with the sshd.service file.

      • SEND_BUTTPLUG_PICS@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        14 hours ago

        Yes my incorrect assumption was due to the fact that sshd came pre-installed with the OS unlike plex that came with its own service file or Jackett that I had to create the service file manually. Sshd is a program like any other that gets started by systemd. I appreciate the clarification!