Results 1 to 5 of 5

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

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    1

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

    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. #2
    Member
    Join Date
    Jan 2011
    Posts
    22

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

    Quote Originally Posted by xbank View Post
    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
    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. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2007
    Location
    Cardiff, UK
    Posts
    110
    cPanel/WHM Access Level

    DataCenter Provider

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

    If you're using CSF then just open port 22222 and SSH to that port instead to gain access again.

  4. #4
    Member
    Join Date
    May 2011
    Posts
    5

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

    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. #5
    Member
    Join Date
    Apr 2003
    Posts
    174
    cPanel/WHM Access Level

    Root Administrator

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

    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.

Similar Threads

  1. SSHD fails...
    By sam.tn in forum cPanel & WHM Discussions
    Replies: 5
    Last Post: 08-05-2008, 10:53 AM
  2. Replies: 2
    Last Post: 04-24-2008, 11:17 AM
  3. Changed sshd port problem
    By fuzzie in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 01-19-2006, 09:55 AM
  4. SSHD exploit?
    By neonix in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 01-04-2006, 11:39 AM
  5. sshd port 22 renumbering or sshd limiting
    By teddymills in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 07-29-2005, 03:14 PM