[Solved] Sshd startup error: Failed at step CGROUP spawning /usr/sbin/sshd: No space left on device

sshd restart error:
systemctl restart sshd.service
The screenshot is as following:


Error Messages:

Failed at step CGROUP spawning /usr/sbin/sshd: No space left on device
Failed to create cgroup /system.slice/sshd.service: No such file or directory

 

The reason for this is that the cgroup is not mounted.

Solution:
Mount the cgroup directory
mount -t tmpfs cgroup_root /sys/fs/cgroup
umount -t tmpfs cgroup_root /sys/fs/cgroup
umount /sys/fs/cgroup

then restart to connect normally
systemctl start sshd.service

Read More: