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 Stopped Working

Discussion in 'General Discussion' started by JGrubbs, Sep 18, 2006.

  1. JGrubbs

    JGrubbs Active Member

    Joined:
    Oct 12, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    SSH was working fine all last week, then on Friday afternoon when I tried to login I started getting this error message in PuTTY:

    Network error: Connection refused

    When I try to restart SSH in WHM I get this error:

    Sep 18 12:55:32 cpanel sshd: Stopping sshd failed Sep 18 12:55:32 cpanel sshd: /usr/sbin/sshd: /usr/sbin/sshd: cannot execute binary file Sep 18 12:55:32 cpanel sshd: failed sshd has failed, please contact the sysadmin.

    And when I try the autofixer (/scripts2/doautofixer?autofix=safesshrestart) I get this error:

    Requesting script ...

    Done.

    Executing script ...

    Killing exisiting sshd processes... done!
    Found sshd binary: /usr/sbin/sshd
    configuring sshd to run on port 22
    sshd failed..

    Done.


    Should I try re-installing SSHd? I'm not sure what could have caused it to stop working.
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    sounds like you may have had ssh configured on a different port

    if so the restart ssh in WHM will not wrok
     
  3. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Try restarting ssh , after running the script to set it back to 22, it may not have restarted.
    Also, check your firewall and be sure port22 is listed. Are you getting red lights for the services?
     
  4. JGrubbs

    JGrubbs Active Member

    Joined:
    Oct 12, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    I have never had it configured to run on a different port. As I stated, it was working fine all last week, then just stopped working on Friday. Not sure what could have caused it.

    When I try to restart SSHd at the terminal I get this error: "cannot execute binary file".

    I don't see SSHd listed in the "Service Status" screen.
     
  5. JGrubbs

    JGrubbs Active Member

    Joined:
    Oct 12, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    I have tried everything I can think of, I am open to any sugestions.
     
  6. mohit

    mohit Well-Known Member

    Joined:
    Jul 12, 2005
    Messages:
    553
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sticky On Internet
    Re:

    .

    Oh sorry i mis-understood your problem, i think you need to ask your server provider to help you out of it, they can take care of this pretty well.


    see ya,
    mohit
     
    #6 mohit, Sep 19, 2006
    Last edited: Sep 19, 2006
  7. JGrubbs

    JGrubbs Active Member

    Joined:
    Oct 12, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    We have this server at our location in our server room, so there is no Data Center involved. I opened a support ticket with cPanel, they have sent me some suggestions via email, but that is about all they can do since they don't have access to the server, since SSH is down.

    I have verified that the openssh RPM's are installed using
    rpm -qa | grep openssh

    But when I try to run up2date to install or update openssh it just says that the package is already updated.
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If you have direct access to the server then you could try logging in through the console serial port and looking into why sshd isn't working from there.
     
  9. chris74108

    chris74108 Well-Known Member

    Joined:
    Apr 30, 2004
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
    netstat -alnp | grep 22

    see if anything is bound to port 22
     
  10. JGrubbs

    JGrubbs Active Member

    Joined:
    Oct 12, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    When I try to restart SSHd at the terminal I get this error: "cannot execute binary file".
     
  11. chris74108

    chris74108 Well-Known Member

    Joined:
    Apr 30, 2004
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
    What is this box running?
     
  12. JGrubbs

    JGrubbs Active Member

    Joined:
    Oct 12, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    WHM 10.8.0 cPanel 10.8.2-R119
    RedHat Enterprise 4 x86_64 - WHM X v3.1.0
     
  13. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    It runs the rpms from your OS vendor, i.e. RedHat.

    I'd suggest removing the openssh rpms:

    rpm -qa | grep openssh

    Then use rpm -e to remove those, e.g.:

    rpm -e openssh openssh-server openssh-clients --nodeps

    Then move /etc/ssh out of the way:

    mv /etc/ssh /etc/sshold

    Then reinstall SSH:

    up2date -ui openssh openssh-server openssh-clients
     
  14. JGrubbs

    JGrubbs Active Member

    Joined:
    Oct 12, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Does cPanel run a special patched version of openssh, or can I just install the version from the openssh site without messing anything up?
     
  15. chris74108

    chris74108 Well-Known Member

    Joined:
    Apr 30, 2004
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
    I was going to suggest you do exactly what Chirpy told you to do. I strongly recommend you take his advise.
     
  16. JGrubbs

    JGrubbs Active Member

    Joined:
    Oct 12, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Jonathan!!!

    I followed your instructions and everything seems to be working great now!!

    I sent your URL to our I.T. Director and recommended we purchase your server services for all of our future servers.

    I can't thank you enough!!
     
  17. chris74108

    chris74108 Well-Known Member

    Joined:
    Apr 30, 2004
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6

    I have been reading posts on these forums for years. In that period of time I have never read anything bad about him (Chirpy). He is a very talented individual who really knows his stuff. If something goes wrong on my servers I usually come here and use the search feature to find the answer.
    Usually when I find a answer its coming from him and it usually works.
    I would recommend his services to anyone.

    Thanks for everything you do Jonathan.
     
Loading...

Share This Page