SSH startup failure solution

  

VPS is shared by 3 people. I don't know who has operated what caused SSH to fail to start. I have been unable to connect at first. I thought the system is broken. I went to the VPS terminal and found that the SSH service was not found. At run, I tried to run SSHD and found the following error:

Starting sshd: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ For ‘/etc/ssh/ssh_host_rsa_key’ are too open. It is recommended that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: /etc/ssh/ssh_host_rsa_key Could not load Host key: /etc/ssh/ssh_host_rsa_key @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Tc/ssh/ssh_host_dsa_key’ are too open. It is recommended that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key Could not load host key: /Etc/ssh/ssh_host_dsa_key Disabling protocol version 2. Could not load host key sshd: no hostkeys available — exiting. [FAILED]

Workaround: #chmod 600 sshd_config ssh_host_dsa_key ssh_host_key ssh_host_rsa_key #chmod 620 moduli #chmod 644 Ssh_config ssh_host_dsa_key.pub ssh_host_key.pub ssh_host_rsa_key.pub #service sshd start

The following error occurs again: [root@bailongjun ssh]# service sshd restart Stopping sshd: [FAILED] Starting sshd: /var/empty/sshd Must be owned by root and not group or world-writable. [FAILED]

Log in directly on the terminal, the problem is displayed as : /var/empty/sshd must be owned by root and not group or world-writable.

Problem:

SSH on Linux fails to start

Report /var/Empty/sshd must be owned by root and not group or world-writable.

Solution:

First enter the linux through the physical terminal, manually check ssh found not running

-bash-2.05b# /etc/init.d/sshd status

sshd is stopped

The service was started manually and the report permission was found to be incorrect.

-bash-2.05b# /etc/init.d/sshd start

Starting sshd:/var/empty/sshd must be owned by root and not group or world-writable.

[FAILED]

-bash-2.05b#

Use the rpm -V command to check that the ssh package is working, but the owner of a directory is wrong.

-bash-2.05b# rpm -V openssh-server

S.5….. c /etc/ssh/sshd_config

…..U.. /Var/empty/sshd

-bash-2.05b#

After checking, the owner of this directory is not root, so start ssh error

-bash-2.05b# ls - Ld /var/empty/sshd/

d–x–x–x 2 vu00106 root 1024 Feb 2 2005 /var/empty/sshd/

-bash-2.05b#

changed to root owner, startup success

-bash-2.05b# chown root /var/empty/sshd/

-bash-2.05b# /etc/init.d/sshd start

Starting sshd: [ OK ]

-bash-2.05b#

This problem has been fixed.

Also, try:

This is a permission issue

The following two steps can be taken

chown -R root.root /var/Empty/sshd

chmod 744 /var/empty/sshd

service sshd restart

can solve the above problem.

Copyright © Windows knowledge All Rights Reserved