The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SSH issue (fail on restart)

Discussion in 'Security' started by PCZero, Jul 5, 2013.

  1. PCZero

    PCZero Well-Known Member

    Joined:
    Dec 13, 2003
    Messages:
    526
    Likes Received:
    34
    Trophy Points:
    28
    Location:
    Earth
    In WHM when I go to
    -- Restart Services - SSH Server (OpenSSH) - Yes

    I get this result...
    -- Waiting for sshd to restart....finished.
    -- sshd (/usr/sbin/sshd) running as root with PID #### (pidfile check method)
    -- sshd has failed, please contact the sysadmin.

    However I can SSH into my server still. I have SSH configured to run on a different port than the standard. Would this cause the flag to be thrown even though SSH is running or is this an issue I need to address?
     
  2. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    942
    Likes Received:
    57
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    I run SSH on an alternate port, and restart from WHM seems fine:

    Code:
    Waiting for sshd to restart....finished.
    
    sshd (/usr/sbin/sshd) running as root with PID 8699 (process table check method)
    
    sshd started ok
    
    As long as you can SSH in you should be fine. otherwise a `ps faux | grep ssh` from root shell could show if there are any strange procs.
     
  3. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    What happens if you restart in SSH command prompt (as root).
     
  4. PCZero

    PCZero Well-Known Member

    Joined:
    Dec 13, 2003
    Messages:
    526
    Likes Received:
    34
    Trophy Points:
    28
    Location:
    Earth
    Quiz - I did not mention that in addition to running on a non-standard port I am running on an IP other than that which localhost is on. The combination seems to be the issue with WHM not recognizing it is running fine. on.

    Quiet - A service restart at command line completes successfully and the process is indeed running.

    It looks like I am OK, just my security is tight enough that WHM can't recognize the process is good.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's likely there is a custom ListenAddress entry in your /etc/ssh/sshd_config file binding SSH to a specific IP address. This is preventing local connections to SSH over 127.0.0.1. You can confirm this with a command such as:

    Code:
    # ssh -p 22 127.0.0.1 
    Thus, even though SSH is running, Chkservd can not monitor it because the localhost connection is refused. You can disable monitoring for SSH in the service manager to avoid seeing these warnings.

    Thank you.
     
Loading...

Share This Page