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.

sshd failed

Discussion in 'General Discussion' started by plake, Dec 13, 2004.

  1. plake

    plake Active Member

    Joined:
    Apr 22, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Attempting to restart sshd
    Waiting for sshd to restart.... . . . . . . . . . . finished.

    sshd status root 32571 1.1 2.2 12812 11500 ? S 19:47

    0:00 /usr/local/cpanel/whostmgr/bin/whostmgr ./ressshd
    Dec 13 19:47:07 xxxx sshd: sshd shutdown failed Dec 13 19:47:07 xxxx sshd: succeeded sshd has failed, please contact the sysadmin.

    Any ideas on fixing this, other than having them login to the box from inside the data center? I found this thread http://forums.cpanel.net/showthread.php?t=22593&highlight=sshd+failed is that they only way?
     
  2. plake

    plake Active Member

    Joined:
    Apr 22, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Well I took a chance and did a reboot, but now both WHM/cPanel are not running...
     
  3. plake

    plake Active Member

    Joined:
    Apr 22, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    ok, so this is a dialogue now of me fixing my server...

    anyways I got cpanel/whm up and running again... talk about a freakout... thank goodness luck was on my side tonight... :)

    whew
     
  4. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    so what happened? ;-D
     
  5. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    As long as you can access whm, you can usually fix ssh (say in the event of a config error) by force installing the rpms using the rpm install manager within whm.

    If that doesn't work, (say bad sshd config that wouldn't be removed, as it had been modified) then I have before today added the user 'nobody' to the wheel group within whm, created an expect script (executed with phpsell) to spawn a shell, su to root (nobody being added to wheel group :), delete the bad config files and download and force install the ssh rpms again, restart sshd.

    Make sure you have the scripts ready before adding 'nobody' to the wheel group, if you do this anytime and make sure to immediately remove from the wheel group afterwards :)

    Just thought I'd share.
     
  6. plake

    plake Active Member

    Joined:
    Apr 22, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    I appricate the replies, I did not think of the option of forcing a shell instance, or reinstalling the rpm.

    I was messing with the sshd config and uncommented the wrong section which caused sshd to fail. The reboot corrected the sshd service, but I had to wait about 30 minutes till it finally came up. After which I logged back in, recommented the comments :P and then restarted the service, bam... restarted the box again and everything is back to normal.

    That was an interesting point, due to the fact that when sshd failed and I restarted, WHM/cPanel services did not restart either. So of course I was freaking a bit because my datacenter charges $150/hr to correct problems from the console at the box.

    Anywho, what I was exactly doing was changing the config status to a different ip and different port #. None the less, it goes back to the stupid check and double check thing, human error, careless, but human...
     
  7. Etheral

    Etheral Well-Known Member

    Joined:
    Dec 8, 2003
    Messages:
    208
    Likes Received:
    0
    Trophy Points:
    16
    Haha... Changing the port and the listen IP is a great way to help secure your SSH from intrusion :). But if you do, do that, you HAVE to remember your port... or your screwed for a long time lol. Also you have to open the port on any firewalls you might have installed. Glade you got this resolved though :)
     
  8. plake

    plake Active Member

    Joined:
    Apr 22, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    I opened the ports for both inbound/outbound, tcp/udp just to be on the safe side, not really sure why it fubared like this, but its been corrected.

    :) still was a nightmare, thinking I might have to pay some idiot to login to my box manually and correct it... ahhhh
     
  9. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    heh, I have webmin installed... to give me an easy alternate access to my server... it has a java file manager, and a java telnet/ssh applet... so if ssh goes down (or it's blocked by the firewall or something), I can get in and fix it. I've only had to use it once when sshd died after an rpm update... but it saved my bacon then. And then because I lock down access to the ssh port to only my ip, I have to be able to get in and update the hosts.allow with my new ip when I go somewhere else. So that's what I mainly use it for now.
     
  10. elderban

    elderban Member

    Joined:
    Aug 26, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I would like to add the suggestion that WHM add a file manager in a future version.
     
  11. xWho

    xWho Well-Known Member

    Joined:
    Apr 23, 2003
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    16
    WHM needs to add the Java file manager and SSH client that Webmin has. Really. It should be must.
     
  12. LordJMann

    LordJMann Well-Known Member

    Joined:
    Jun 15, 2003
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    I second this, if SSH is down, you are screwed for trying to edit config files or execute commands.
     
  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
    Well, you can put in a request to cPanel - for those that cannot wait, there is one available now, of course :)
     
Loading...

Share This Page