Change port through WHM

Sometimes we are able to log into the WHM but unable to log into the server with the default port 22. In such situations, you can follow the steps below to reset the server port to default 22 from WHM.

Login to WHM

Then, browse the following URL to reset your SSh configuration settings:

http://serverip:2086/scripts2/doautofixer?autofix=safesshrestart

Note: Replace “serverip” with your server’s IP address.  Once the script is ran successfully, you will be able to log in to the server using port 22.

Once you have logged into the server, you will have to check the port from /etc/ssh/sshd_config , as it gets reverted after the service restart.