Search code examples
debiansshdsystemctl

Turn back systemctl service after remove


Incidental I call

systemctl disable sshd

I have no Idea it would delete node, but it is. I only want to prevent it from auto starting while boot.

How to turn back sshd to be controlled from systemctl (re-install wasn't helpful) ?


Solution

  • systemctl disable sshd removes symbolic links which prevents the service from starting on boot, it's not deleting anything else. If you want to enable it back, do sudo systemctl enable ssh (note that it's ssh not sshd in Debian/Ubuntu, after you enable it it will create a 2nd symlink named sshd).