Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

sshd has failed

Discussion in 'General Discussion' started by sserbest, Nov 28, 2017.

  1. sserbest

    sserbest Registered

    Joined:
    Jul 2, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    Hello Everyone,

    First of all I don't have KVM access or anything else, Second I tried to uninstall SSHD and install again didn't solve the problem. If someone can tell me how can change /var/empty/sshd folder permission from WHM/Cpnel I think I can fix the problem.

    I hope someone can help me.

    Service Error
    (XID 2ptdbd) The “sshd” service failed to start.

    Startup Log
    systemd[1]: sshd.service: main process exited, code=exited, status=255/n/a
    systemd[1]: Failed to start OpenSSH server daemon.
    systemd[1]: Unit sshd.service entered failed state.
    systemd[1]: sshd.service failed.

    Log Messages
    Nov 28 13:59:12 server sshd: /var/empty/sshd must be owned by root and not group or world-writable.
     
    #1 sserbest, Nov 28, 2017
    Last edited by a moderator: Nov 28, 2017
  2. sserbest

    sserbest Registered

    Joined:
    Jul 2, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    Forget to add versions; Centos 7.4 and Cpanel version v68.0.16
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,633
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You can't manipulate file/directory permissions for system files via Web Host Manager, but you could try temporarily starting a new instance of SSH using the SSH autofixer referenced at:

    SSH Connection Denied

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. sserbest

    sserbest Registered

    Joined:
    Jul 2, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    Yes, I tried this before and here is the result.


    AutoFixer Execution
    Requesting script ...

    Done.


    Executing script ...


    Attempting to locate sshd binaries installed on the system ...<br />
    Located /usr/sbin/sshd<br />
    Done.<br />
    Killing exisiting sshd processes...<br />
    Done.<br />
    configuring sshd to run on port 22<br />
    Could not load host key: /etc/ssh/ssh_host_dsa_key
    /var/empty/sshd must be owned by root and not group or world-writable.
    failed to start /usr/sbin/sshd ...<br />


    Done.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,633
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    There's no additional method of solving that issue without console access to the system. Since that's not possible (per your initial post), then you may need to report this to your provider or data center so they can address the issue.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. sserbest

    sserbest Registered

    Joined:
    Jul 2, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    Thank you, for your response but I wish there is a way to solve this issue easily.

    I solved the problem with different approach. I'm using Google Cloud Services and I remember Google allows me to run Startup script and I use that to change folder permission and problem solved.

    Here is the trick :) I hope will help someone else. Under VM instance details, there is place name "Custom metadata" If you add this code (double quotes just for separation each input field) and restart the server, will solve the issue.

    "startup-script" "chown root:root /var/empty/sshd"
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,633
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm glad to see you were able to solve the issue. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice