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.

Changed SSHD port to 22222 - SSHD Down - Can recover from WHM Panel

Discussion in 'General Discussion' started by xbank, Jun 25, 2011.

  1. xbank

    xbank Registered

    Joined:
    Jun 25, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I was trying to secure my sshd and changed the port to 22222 instead of 22444 .. restarted the sshd and boom.

    I tried restarting from WHM but useless as because I changed the port and restarted the sshd daemon.

    Is there a way I can fix it from WHM .. I have a latest Cpanel


    Thanking You!
    Xbank
     
  2. Kristian0911

    Kristian0911 Member

    Joined:
    Jan 17, 2011
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    If you are able to access the server, you will need to login to server with SSH and edit the ssh config file.

    vi /etc/ssh/sshd_config

    change the Port number to 22 or which ever you want.

    OR ask your server provider to change it to default port. They should help you with the issue.

    Thanks :)
     
  3. PenguinInternet

    PenguinInternet Well-Known Member
    PartnerNOC

    Joined:
    Jun 20, 2007
    Messages:
    149
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Cardiff, UK
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    If you're using CSF then just open port 22222 and SSH to that port instead to gain access again.
     
  4. adminlogs

    adminlogs Member

    Joined:
    May 30, 2011
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi ,

    Regarding ,

    >>>> Is there a way I can fix it from WHM

    Log in to WHM as root user and browse following URL.

    /http://192.168.0.100:2086/scripts2/autofixer

    Use your server ip instead of 192.168.0.100 in above URL. To reset the sshd_config file insert "safesshrestart" in autofixer window

    The above will reset your ssh port to the default one 22. Once the above script execution is over then you can login to the server using port 22 and change the port as you like.

    Sincerely,
     
  5. astopy

    astopy Well-Known Member

    Joined:
    Apr 3, 2003
    Messages:
    165
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    When you restart sshd it doesn't close existing connections, so next time check that you're able to open a new connection *before* logging out.

    If your host gives you remote console access you'll be able to log into that to fix it.
     
Loading...

Share This Page