How to reset SSH port from WHM?
All of us know about the default SSH port number on a Linux server. Yeah, here in WHM, no change in the default SSH server. The default port number is 22. We can change the port number by editing the SSH configuration file via server command line interface.
Consider the scenario, you changed the port to a non default value and you just forgot it!! Lol. You can’t access the server shell anymore.
However, you are able to access the WHM panel without SSH details. Say thanks to cPanel developers, yeah, there is an option to reset the SSH port to the default value from the WHM interface.
There is an Auto fixer script available to 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 : Then, access the following URL to reset your SSH configuration settings to default:
Replace “serverip” with your server’s IP address or hostname, whatever you are using to access the WHM panel.
After executing this script, the port number of your SSH server will be reset to its default value 22. Now, you can log into your server through the port 22 and reset the configuration.
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.
🙂 Enjoy!! Happy hosting!!
Also read : Change SSH port of a server having Webmin