Changing SSH Port via WHM for Enhanced Security

thumb_up 1  ·  sell SSH port reset, WHM SSH configuration, Security enhancement via SSH port change

This is a new way I found to reset ssh port from WHM control panel if you ever lost SSH access because you forgot what is the port you are running, or something got screwed up in the middle of your sshd configuration.

On Linux servers the default SSH port is 22, this also applies to cPanel based servers. This ssh port can be changed by editing sshd_config file, usually located at:

/etc/ssh/sshd_config

How can I reset SSH port from WHM?

 

What happens if you change the ssh port and then forgot what was the port number? You won’t be able to access your SSH server anymore.

But don’t worry, there are a few things you can do to fix this.  cPanel developers have built a cool ssh port reset script that can be used to you are able to reset SSH port from WHM control panel.

This script is called SSH Auto Fixer, and is available from a single URL after you login to the WHM interface. Let’s see what are the necessary steps to reset SSH port from WHM root interface:

1. Log into WHM control panel as root.

 

2. After that, use the following URL on your browser to reset your SSH confiugration to the default one:

http://your.server.ip:2086/scripts2/doautofixer?autofix=safesshrestart

Make sure you replace “your.server.ip” with the IP address of your real server, you can also use the hostname of your server, as you see below:

Fig. 01. Process of how to reset ssh port from WHM interface using ssh autofixer script Fig. 01. Process of how to reset ssh port from WHM interface using ssh autofixer script

The result will be that your sshd daemon will now be running on the default port (22). At this point you are ready to login again using SSH and start editing your SSHD configuration.

What happens if I already use port 22 for another service?

If port 22 is already used by another app or service, the script will open another port different than 22.

Now you know how to reset SSH port from WHM control panel in case you’ve been locked out of your server.

 

The End! should you have any inquiries, we encourage you to reach out to the Vercaa Support Center without hesitation.

Was this answer helpful?

Related Articles

description

Enabling Global Gzip Compression in WHM for All Accounts and Websites

Apache mod_deflate module is one of the best friends of a cPanel system administrator. It allows you to save bandwidth and accelerate page…

arrow_forward
description

Validating and Confirming cPanel License Information

cPanel and WHM is the #1 leading control panel in the web hosting market. And time ago we posted a post about how to get a free cpanel…

arrow_forward
description

Essential Nginx Modules for cPanel and WHM: Top 4 Picks

As we all know, cPanel doesn’t fully support Nginx yet, it will be ready in the future as it is one of the most requested features from…

arrow_forward
description

A Guide to Utilizing the MultiPHP INI Editor in cPanel

With the new EasyApache 4 we have a new option called MultiPHP INI Editor. It’s a simple PHP editor for WHM users who need to change PHP…

arrow_forward
description

Configuring EasyApache 4: A Step-by-Step Guide

EasyApache (aka EA4) 4 is the ultimate PHP and Apache management tool for cPanel servers. EasyApache 3 becomes a dinosaur from the…

arrow_forward
arrow_back « Back