How to start the SSH service if it fails after rebooting the server
Jump to navigation
Jump to search
HOW TO START THE SSH SERVICE IF IT FAILS AFTER REBOOTING THE SERVER
Step1:
please the check ssh service
systemctl status ssh.service
Step2:
And give below command
sudo sshd -t
Step3:
It shows the missing privilege directory below the outputs
Missing privilege separation directory: /var/run/sshd
Step4:
Please create the directory in sshd and follow the below command
mkdir -p /var/run/sshd
give ownership to that directory Please follow the below command
chown root:root /var/run/sshd
Step5:
After restarting the SSH
systemctl restart ssh
Step6:
Finally, this will work on the server and SSH port issue resolve in the server
sudo sshd -t