You are not logged in.
I've noticed this on 2 installs already. If I install openssh
# pacman -S openssh
and enable the socket:
# systemctl enable sshd.socket
I can't actually use ssh to connect to the system (the connection is refused) unless I also run:
# systemctl start sshd
However, after I reboot the system it works as advertised; i.e. no need to start the service. I'm new to systemd -- am I missing something? I haven't tried enabling the socket and immediately rebooting, but am assuming that just starting the service isn't persistent across reboots.
Last edited by pgoetz (2014-03-20 13:55:55)
Offline
https://wiki.archlinux.org/index.php/Sy … sing_units
systemctl enable <servicename> indeed only activates said service the next time systemd is started (at bootup for example).
systemctl start <servicename> starts it right away.
All in all, working as intended in other words
Last edited by Gcool (2014-03-20 11:00:26)
Burninate!
Offline
Thank you -- that's exactly what I needed to know. I'll edit the Secure Shell wiki page to prevent this question from coming up again.
Offline
Note that you enabled sshd.socket (which was then started after a reboot), but when you manually started sshd, you didn't specify the exact unit name, meaning you actually started sshd.service instead of sshd.socket. Not a huge difference and it only lasts till the next reboot; just thought I'd point it out.
Offline
Note that you enabled sshd.socket (which was then started after a reboot), but when you manually started sshd, you didn't specify the exact unit name, meaning you actually started sshd.service instead of sshd.socket. Not a huge difference and it only lasts till the next reboot; just thought I'd point it out.
Thanks -- I hadn't thought about it this carefully. And even less of a difference given that I typically ssh to the machine 60-90 seconds later. <:)
Unrelated: I tried to mark the subject line with [SOLVED], but there seems to be a character limit which prevents me from adding any more characters? If I mark it, the previous subject line will become unintelligible.
Offline
Try "[SOLVED] Why does systemctl not start sshd when I enable it", I think it captures the essence of the thread.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline