You are not logged in.

#1 2015-11-22 20:25:44

madhias
Member
Registered: 2015-10-26
Posts: 12
Website

[SOLVED] Automatic startup of sshd.socket

Hi all,

I am a little bit confused about starting up automatically services or different things at startup. For example systemctl is-enabled sshd.socket output is enabled, but then I also have to start sshd.socket with systemctl start sshd.socket manually. So basically two things have to be done? Enabling and starting? Maybe I am mixing up something!

Thanks for help!

Last edited by madhias (2015-11-24 19:49:44)

Offline

#2 2015-11-22 21:17:48

c0mm0ner
Member
Registered: 2015-11-09
Posts: 93

Re: [SOLVED] Automatic startup of sshd.socket

If you enable a unit, it doesn't get started immediatly: https://wiki.archlinux.org/index.php/Sy … sing_units

Offline

#3 2015-11-22 22:09:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,612

Re: [SOLVED] Automatic startup of sshd.socket

When it is enabled, it will start at boot.  Enabling while booted does not start it.  So,  if it is not running and you want it now, start it.  If you wan it to run automatically next time you boot, enable it.  If you don't ever want to to run, disable it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2015-11-23 10:25:47

LCvanDinteren
Member
From: Netherlands
Registered: 2015-10-27
Posts: 153

Re: [SOLVED] Automatic startup of sshd.socket

In addition:

If you want to enable a service and directly start it, instead of calling both start and enable separately, you can pass the "--now" flag to the enable function.
like this:

$ systemctl enable sshd.socket --now

This will start the service immediately and also start it on reboot.

Offline

#5 2015-11-24 19:49:10

madhias
Member
Registered: 2015-10-26
Posts: 12
Website

Re: [SOLVED] Automatic startup of sshd.socket

Thanks for all your answers and clarification! As I saw right now sshd.socket was correctly enabled at boot. journalctl -u ssh.socket told me that the listening on the unit has started!

Offline

Board footer

Powered by FluxBB