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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SSH down

Discussion in 'General Discussion' started by JMGarcía, Feb 27, 2018.

Tags:
  1. JMGarcía

    JMGarcía Member

    Joined:
    Oct 11, 2016
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Hello,

    In Service Status I see this:

    Service Version Status

    sshd clients-7.4p1-13 down

    All my sites working fine but when tried restart SSH and get this:

    Waiting for “sshd” to start ……Job for sshd.service failed because the control process exited with error code. See "systemctl status sshd.service" and "journalctl -xe" for details. …failed.

    Cpanel::Exception::Services::StartError Service Status

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

    Startup Log
    Feb 27 14:54:59 sv.domain.com systemd[1]: sshd.service: main process exited, code=exited, status=255/n/a
    Feb 27 14:54:59 sv.domain.com systemd[1]: Failed to start OpenSSH server daemon.
    Feb 27 14:54:59 sv.domain.com systemd[1]: Unit sshd.service entered failed state.
    Feb 27 14:54:59 sv.domain.com systemd[1]: sshd.service failed.

    Log Messages
    Feb 27 14:54:59 sv sshd[319]: fatal: Cannot bind any address.
    Feb 27 14:54:59 sv sshd[319]: error: Bind to port 22 on :: failed: Address already in use.
    Feb 27 14:54:59 sv sshd[319]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
    Feb 27 14:54:32 sv sshd[32625]: fatal: Cannot bind any address.
    Feb 27 14:54:32 sv sshd[32625]: error: Bind to port 22 on :: failed: Address already in use.

    sshd has failed. Contact your system administrator if the service does not automagically recover.


    Is this a critical issue? How can I fix this?

    Thanks
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    This suggests another service is already running on port 22. You can run the following command to see which process is utilizing the port:

    Code:
    netstat -tulpn | grep :22
    Thank you.
     
  3. JMGarcía

    JMGarcía Member

    Joined:
    Oct 11, 2016
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    netstat -tulpn | grep :22

    show this:

    [root@sv ~]# netstat -tulpn | grep :22
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 32597/sshd
    tcp6 0 0 :::22 :::* LISTEN 32597/sshd
    [root@sv ~]#
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    In this case, it looks like SSH is in-fact running on port 22. Here's a response from one of our Technical Analysts on a similar issue opened via a support ticket. Check to see if this helps to solve the issue on your system:

    Thank you.
     
  5. JMGarcía

    JMGarcía Member

    Joined:
    Oct 11, 2016
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Hello,

    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 />
    killed 32597 Done.<br />
    configuring sshd to run on port 22<br />
    Could not load host key: /etc/ssh/ssh_host_dsa_key
    /usr/sbin/sshd successfully started!<br />
    root 26161 0.0 0.0 104508 1372 ? Ss 21:47 0:00 /usr/sbin/sshd -f /var/cpanel/safe_sshd
    <br />


    Done.

    But still issue,... Service Version Status SSh down and if restart error,...
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Could you open a support ticket using the link in my signature so we can take a closer look?

    Thank you.
     
  7. JMGarcía

    JMGarcía Member

    Joined:
    Oct 11, 2016
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Your Support Request ID is: 9320465
     
Loading...

Share This Page