Skip to main content

WHM: How to Reset the SSH Port

The article describes how to reset the SSH configuration to the default values from WHM

Scott avatar
Written by Scott
Updated over 2 weeks ago

If you've changed your SSH port from the default 22 for security reasons but later forgot the new port or misconfigured the SSH settings, you may find yourself locked out of the server. Fortunately, if you still have access to WHM as root, there’s a quick way to reset the SSH configuration and regain access. In this article, we will help you update the SSH settings using WHM's autofixer tool. By running a built-in WHM autofixer script, you can restore the SSH port to its default or receive a new working port, allowing you to reconnect and fix the configuration safely.

  1. Enter WHM - If you don't know how, you can follow this guide.

  2. Access the following URL to reset your SSH configuration settings.

    https://example.com:2087/scripts2/doautofixer?autofix=safesshrestart

    Replace 'example.com' with the hostname or server IP address which you are using to access the server

  3. Once the script runs successfully, SSH access will be restored on the default port 22, allowing you to log in and update the configuration as needed.

  4. If port 22 is already in use by another service, the script will automatically assign a different port for SSH and display it on the screen. This temporary configuration will remain active until the next SSH service restart.



    Congratulations! You’ve successfully reset your SSH port using WHM.

    If you have any questions, please don’t hesitate to contact our team via live chat.

    For technical inquiries, please feel free to reach our support team by emailing support@bigscoots.com from your registered email or by submitting a support ticket.

Did this answer your question?