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.

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:
    6
    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:
    447
    Likes Received:
    4
    Trophy Points:
    18
    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.
     
  3. khorinis

    khorinis Well-Known Member

    Joined:
    Aug 15, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    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:
    447
    Likes Received:
    4
    Trophy Points:
    18
    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.
     
  5. khorinis

    khorinis Well-Known Member

    Joined:
    Aug 15, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    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:
    447
    Likes Received:
    4
    Trophy Points:
    18
    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. :)
     
Loading...

Share This Page