Results 1 to 7 of 7

Thread: can't start sshd service with systemctl

  1. #1
    Join Date
    Dec 2014
    Location
    New York
    Posts
    20

    Default can't start sshd service with systemctl

    Hello All!

    I am relatively new to openSUSE, and am coming from a systemd free distribution (Funtoo)

    I have noticed that to start sshd, I have to run a command called rcstart sshd, instead of systemctl start sshd.service.

    Is this a bug? Why isn't possible to start the system by using a systemd service.

    The question is motivated out of curiosity rather than anything else.

    I noticed that 13.2 has just recently been released, Maybe I should have installed 13.1 as it's been out for quite a while while the kinks are worked out of 13.2?

    Thanks!

  2. #2
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: can't start sshd service with systemctl

    The error when you run systemctl start sshd is what exactly?

    We need logs, debug information, something to go on other than "It doesn't work." - you can find these by running; journalctl -l or systemctl status sshd
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  3. #3
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,703

    Default Re: can't start sshd service with systemctl

    No kinks just need to know how to do things.

    Happy to help but more information is needed.

  4. #4
    Join Date
    Dec 2014
    Location
    New York
    Posts
    20

    Default Re: can't start sshd service with systemctl

    Quote Originally Posted by Miuku View Post
    The error when you run systemctl start sshd is what exactly?

    We need logs, debug information, something to go on other than "It doesn't work." - you can find these by running; journalctl -l or systemctl status sshd
    Right. Thanks for the tips. I am aware of needing logs, just didn't know how to call them, or what to post since there were not errors after running them at all. Also since I'm new to systemd in general, I didn't know where the .services were housed.

    I first ran systemctl start sshd.service last night, then toggled with rcstart. Running rcstart sshd did work, again with no output. I didn't know how to check behind the scenes messaging and assumed nothing was happening because no errors were being thrown despite sshd not running with systemctl

    Checking journalctl right now - it had a lot of stuff in between, and I didn't want to sift through a couple hours of logs.

    Just now, restarting the service by running systemctl restart sshd.service did work, checking journalctl showed it as well.

    I also didn't know where the services folder was, so I couldn't check for the existance of sshd.service.

    By running systemctl status sshd.service I saw which folder services are found in, which was another question I had that answered itself.

    Coming from another distro that is openrc based, opensuse's implementation of systemd services, diagnostic tools, and error messages are posted differently are throwing me for a loop. aka: learning curve

    Quote Originally Posted by gogalthorp View Post
    No kinks just need to know how to do things.

    Happy to help but more information is needed.
    Thanks. I'm learning the intricacies. systemctl start/stop sshd.service is now running correctly. Heck, for all I know it was correctly running last night, and since it was starting off for the first time was generating the RSA and other keys for the system and wasn't ready when I tried to connect.

    Knowing journalctl -l now, I'll post in the next issue I may have.

  5. #5

    Default Re: can't start sshd service with systemctl

    Quote Originally Posted by cuchumino View Post
    Running rcstart sshd did work, again with no output.
    I don't believe that:
    Code:
    # rcstart sshd
    If 'rcstart' is not a typo you can use command-not-found to lookup the package that contains it, like this:
        cnf rcstart
    # cnf rcstart
    rcstart: command not found
    You probably mean "rcsshd start"? But this just calls systemctl in the end, it is mainly there for backwards compatibility.

    Btw, you can setup sshd.service to be started automatically on boot with:
    Code:
    systemctl enable sshd
    Or you can also use YaST->System->Services Manager for starting/stopping, enabling/disabling, and getting the status of services.

    And systemd services are located in /usr/lib/systemd/system/ or /etc/systemd/system/, "systemctl status" shows you the complete path to the corresponding service file as well.

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: can't start sshd service with systemctl

    On 2014-12-04 18:06, cuchumino wrote:
    >
    > Hello All!
    >
    > I am relatively new to openSUSE, and am coming from a systemd free
    > distribution (Funtoo)
    >
    > I have noticed that to start sshd, I have to run a command called
    > rcstart sshd, instead of systemctl start sshd.service.


    It would be "rcsshd start" or "systemctl status sshd.service".
    Why do you have to use one or the other? You do not say what fails.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  7. #7
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,703

    Default Re: can't start sshd service with systemctl

    You can have a regular text journal if you want rather then or in addition to the systemd binary one. The binary one allows sorts and filters which can help in debugging.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •