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!

Could someone post cpanel sshd_config?

Discussion in 'General Discussion' started by khorinis, Aug 27, 2010.

  1. khorinis

    khorinis Well-Known Member

    Joined:
    Aug 15, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    56
    Hello,
    could someone post a non modified current sshd_config file of cpanel? I have edited my file and haven't made a backup...
    Thanks.
     
  2. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    459
    Likes Received:
    6
    Trophy Points:
    68
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    If I were you, I would run the script below and then make the changes again.

    http://yourdomain.com:2086/scripts2/doautofixer?autofix=safesshrestart

    Replace yourdomain.com with your server's IP or resolved hostname off course.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. khorinis

    khorinis Well-Known Member

    Joined:
    Aug 15, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    56
    Does it would replace it with a standard file?

    //Edit:
     
    #3 khorinis, Aug 27, 2010
    Last edited: Aug 27, 2010
  4. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    459
    Likes Received:
    6
    Trophy Points:
    68
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    Depends on how extensively you have tweaked sshd_config. It normally resets SSH port from any other to default 22.
    If you have access to console, check /etc/ssh/ folder for a file named sshd_config.rpmnew or similar. This should be the default file. Copy it into sshd_config and you should be good to go after a service restart. If this doesn't work, you can re-install ssh via yum after renaming the current config file.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. khorinis

    khorinis Well-Known Member

    Joined:
    Aug 15, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    56
    SSH restarted now and i just needed to find out which line the missconfiguration was with "/etc/init.d/sshd restart" and then i fixed the wrong line: it's now running fine again. Thanks.
     
  6. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    459
    Likes Received:
    6
    Trophy Points:
    68
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    Glad things are working now. Redundancy is the way to go when you are dealing with sensitive files. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice