How to reset SSH Port to Default Port 22 on a cPanel server

For security reason, it is recommended that you change your server default SSH port from 22 to any other port. We have a detailed step by step tutorial for changing SSH port.
How to change SSH port of a Linux server

But if you have forgot your server new SSH port number, or if the new SSH port is blocked at server, here is how you can reset SSH port back to default 22 port on a cPanel server.

Step 1:

Login in WHM of your server using root.

http://serverip:2086

Step 2:

Add following url at the end of your WHM url and run it.

scripts2/doautofixer?autofix=safesshrestart

The final url may be like:

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

Your server SSH port is now reset to default 22. If its not working, you may need to restart SSH from

WHM >> Restart Services >> SSH Server

Our Top Rated Host

Related Posts