Unable to start OpenSSH service in CentOS 7.1
You can mask and unmask service. Masking is like disabling a service. It not only makes sure that service is not started automatically anymore, but even ensures that a service cannot even be started manually anymore. Mask command symply makes symlink to /dev/null
like this:
$ ln -s /dev/null /etc/systemd/system/sshd.service
$ systemctl daemon-reload
Masking a service is a permanent change, much like disabling a service.
Enable service first:
systemctl unmask sshd.service
See more about systemd : systemd for Administrators, Part V by Lennart Poettering
Related videos on Youtube
Comments
-
the_Strider over 1 year
I am trying to install OpenSSh server on a fresh CentOS 7 machine , although the installation went fine but when I am trying to enable/Start, or to know the status of sshd.service using systemctl I am getting an error ,
"Failed to issue method call : Unit sshd.service is masked"
.Thank you.
I have taken every steps mentioned in this guide,and CentOS docs but I am still unable to unmask the service .