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.

Reinstall ssh defaults

Discussion in 'General Discussion' started by maquinadigital, Jun 29, 2009.

  1. maquinadigital

    maquinadigital Well-Known Member

    Joined:
    Aug 10, 2006
    Messages:
    51
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    DataCenter Provider
    Greetings,

    I've tried to change the port on sshd server and now I can't access the server by ssh.

    I still have root password and WHM / Cpanel access as root, as well as FTP, etc.


    Do anybody has any clue as how I could restore the default sshd_config file or something, using whm or any of the things I still have access to?

    The server is about 300 miles from my office and on-hands services are expensive.

    Best regards and thanks in advance.
     
  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
    Try resetting SSH via WHM using this.

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

    Make sure, the port you are setting for SSH is opened in the server firewall before resetting SSH port.
     
  3. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    397
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
    If you changed the ssh port and you got locked out, most likely there's a firewall blocking that port. If you have kvm access you can just stop the firewall and see if that helps.
     
  4. maquinadigital

    maquinadigital Well-Known Member

    Joined:
    Aug 10, 2006
    Messages:
    51
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    DataCenter Provider
    Thanks! It worked!
    The port was open but I forget to check if there was another service running on it and... it was.

    Regained access to the server, reconfigured another port, and it's working fine.

    Live safer, thank you very much.
     
    rodrocolodro likes this.
  5. 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 your issue was solved. :)
     
  6. neorder

    neorder Well-Known Member

    Joined:
    Jun 16, 2003
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    It also solved my problem, thanks Howard.
     
  7. 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 I could help.

     
Loading...

Share This Page