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 problem

Discussion in 'General Discussion' started by Nightweaver, Sep 10, 2005.

  1. Nightweaver

    Nightweaver Member

    Joined:
    Aug 26, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Belgrade
    I've seen that a lot of people had similar problem but it seems I can't solve it the way they did. The problem is:

    Attempting to restart sshd
    Waiting for sshd to restart.... . . . . . . . . . . finished.

    sshd status

    root 395 0.9 1.5 17164 15796 ? S 15:34 0:00 /usr/local/cpanel/whostmgr/bin/whostmgr ./ressshd
    root 414 0.0 0.1 3800 1436 ? S 15:34 0:00 /usr/sbin/sshd


    Sep 10 15:34:14 secure sshd: sshd -TERM succeeded Sep 10 15:34:15 secure sshd: succeeded sshd has failed, please contact the sysadmin.

    I've changed the port of SSH so that it doesn't work on 22. And everything worked OK for a week or so untill last night when SSHd died all of a sudden. I was online waching activities on server with TOP and at one point I lost ssh connection. When I tried to connect to it I just got:"Operation timed out". I have the same setting on another server with Cpanel and it works just fine even after restarting ssh.

    I've tried upgrading CPanel, reinstalling OpenSSH and still, it's not working. Any idea?
     
  2. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    16
    Can you connect back to it on port 22?
     
  3. Nightweaver

    Nightweaver Member

    Joined:
    Aug 26, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Belgrade
    No. I've put it on 777. And it worked just fine. I restarted it manualy from shell. It seems that one of the owners of this server has restarted it through CPanel and it has went wild. I've set it up to work on other port than 22 and that no root user can log in. You have to do SU. And I've let only one user on that server use shell. I've created the same settings on the other server and they both worked just fine for more that a week. And, like I've said, this one crashed last night. Now I can't bring it up. I've tried rebooting that machine but it didn't bring SSH up.
     
  4. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    16
    I would contact your NOC and see if they can reset the ssh config for you from a terminal
     
  5. Nightweaver

    Nightweaver Member

    Joined:
    Aug 26, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Belgrade
    Heh...I'd try and avoid that because they take a lot of $$ for just taking a look at something.:)
     
  6. mickc1303

    mickc1303 Member

    Joined:
    Jan 31, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I'm having the same problem. Any advice would be appreciated.
     
  7. pshepperd

    pshepperd Well-Known Member

    Joined:
    Feb 12, 2005
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    I am pretty sure that what happens is in how you launch it, I think you will find it is pulling from two different config files.

    /scripts/restartsrv_sshd

    When you reinstalled it how did you reinstall?
     
  8. mickc1303

    mickc1303 Member

    Joined:
    Jan 31, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I was following this thread on how to secure your server. http://forums.cpanel.net/showthread.php?t=30159

    I did the ssh configuration, binded to ip, port etc but when I tried to log back in via ssh I get a network error: connection timed out.

    I then went into whm and restarted sshd and got the following error.

    Sep 18 20:34:47 azure sshd: sshd -TERM succeeded Sep 18 20:34:47 azure sshd: succeeded sshd has failed, please contact the sysadmin.

    I tried reinstalling openssh via whm but the same error persists.

    I also have apf installed but since sshd isn't actually starting up sucessfully I don't think thats causing the problem.

    Problem is the guy I rent the server from is backpacking somewhere around Australia so I can't get it reset.
     
  9. MMarko

    MMarko Well-Known Member

    Joined:
    Apr 18, 2005
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    16
    Did you forget to open port 777 in your firewall conf?

    I did that twice :)
     
  10. mickc1303

    mickc1303 Member

    Joined:
    Jan 31, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    yeah I did forget to open up the port in the firewall. So does that mean I am stuck :(
     
  11. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I've replied to your PM with the same offer of help I gave to Nightweaver above when he was in the same boat, you don't have to be stuck ;)
     
  12. ctbhost

    ctbhost Well-Known Member

    Joined:
    May 31, 2002
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    i think you are - word of advice for future, always stay logged in to ssh when making these changes - then open a second session if you cant connect you still have acces to the server to change things.

    i think you may need to find your backpacker and get it sorted.
     
  13. ctbhost

    ctbhost Well-Known Member

    Joined:
    May 31, 2002
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    correction looks like chirpy is the man
     
  14. mickc1303

    mickc1303 Member

    Joined:
    Jan 31, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Many thanks to Jonathan for fixing this problem for me :D
     
  15. MMarko

    MMarko Well-Known Member

    Joined:
    Apr 18, 2005
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    16
    Can you please post here how to solve this? If it's not a seceret :)
     
  16. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I used some expect scripts to install our File Manager/Console using which I was able to fix SSHD.
     
  17. mickc1303

    mickc1303 Member

    Joined:
    Jan 31, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    And an excellent job he did too :D
     
  18. ntwaddel

    ntwaddel Well-Known Member

    Joined:
    Nov 3, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Templeton, CA
    its definently a trustix problem, not cpanel. I have a test trustix install i setup in vmware a few months ago, i just did a swup --upgrade on it today to see if it would break. it updated the openssh-* rpm's and bam, no more restart :(

    So is there anyword on trustix fixing this problem? I posted on their forum

    sshd fails after last update
     
Loading...

Share This Page