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.
Access Linux Shell From Windows Machine Using Putty
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
7 thoughts on “How to reset SSH port from WHM?”
Thank you very much. I have been looking for this solution for days!!!!! I am moving VPS to another company and the transfer tool will not work if the ports were not the same, after I applied your fix: http://yourserverip:2086/scripts2/doautofixer?autofix=safesshrestart worked perfectly!!!!!!! Thank you again!!
Thanks a lot… My SSH was not working… miraculously this fixed the issue…
You are most welcome, Taha!
Please contact me ASAP
I need urgent help with VPS server