How to reset SSH port from WHM?gozen
We all know that changing the default SSH port (22) on your server is a security measure, but what happens if for some reason you forgot the port you changed to?
Well, if you are still able to access WHM (with your root password) then you can easily find a workaround in order to correct the problem and regain access to your server via SSH.
Say thanks to cPanel developers, there is an option to reset the SSH port to the default value from the WHM interface.
There is a script available that can reset the SSH port, once you have the details (root details) to WHM control panel.
Please do followup the steps pasted below to reset the SSH port from web browser.
Step 1 : Log into WHM control panel as root user.
Step 2 : Access the following URL to reset your SSH configuration settings to default
Just use your real server IP or hostname (if you have an A record in your DNS Zone File) and the port number of your SSH server will be reset to its default value 22.
If port 22 is already in use for any other service then, another port will be opened for SSH and it will be displayed in the screen where you are executing the script.
Now, you can SSH into your server through the port 22 and correct your configuration for further use.