![]() ![]() So I modified the port number specified in Putty and changed it to 5622 instead. In the screenshot below, I’ve tried to access SSH via Putty using the same parameters as in the very first screenshot – namely with port 2222. Now that we’ve instructed SSH to accept connections through a new port, it’s time to test it and see if it works. Simply click the large blue button labeled “Yes”, and WHM will restart SSH for you. On the left-hand side of the WHM screen, under the section called “Restart Services”, you will find the “SSH Server (OpenSSH)” option. Now we have to restart SSH to make sure that this parameter is applied. Save the file and return to the previous screen. In the example below, I’m using the ConfigServer File Explorer:Īs shown in the screenshot below, simply replace the existing number with the one we want to use – in this case, 5622. Using a file manager of your choice, navigate to the following directory. Once the port has been opened, it’s time to switch SSH to it. We need to do this because the csf.config file has changed and the new environment variables have to be loaded into CSF. Once you save your changes, you can restart CSF and lfd on the following screen. You can see that I’ve added it to the list at the end of all the others: For purposes of this example, I’m going to use port number 5622 – purely at random. As shown in the screenshot below, we’re going to add our alternative SSH port to the list of those that are allowed to receive incoming connections. This opens up a easy way to modify the main csf.config without making mistakes. Next, log into WHM and under the “ConfigServer Security&Firewall” option on the left-hand side, search for “Firewall Configuration”. Opening a New Port in WHMįirst, make sure that you have the CSF firewall installed. Let’s see how to go through this list one by one. Open a the new port through the firewall.I’m going to carry this out entirely from within WHM itself. At the start of this tutorial, here is what my SSH access via Putty looks like: In this article, let’s look at how to change the standard SSH port from 22 or 2222 to something arbitrary. ![]() So while some may complain that the whole “security by obscurity” paradigm is flawed, there is no harm in creating an additional barrier against attacks. Changing the SSH port adds another layer to your standard security practices without compromising them. For example, if your server allows SSH connections onto widely used ports, it makes the job of a hacker that much more convenient. Many well-known services have predictable points of entry that hackers can exploit to make their job easier. This is one of the reasons why for example, it’s a good idea to disable root logins into SSH, since attackers won’t have a ready made username to work with. Part of the strategy to deter hackers is to reduce the information available to them. How to Change the SSH Port with WHM Posted on Updated on December 13, 2020 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |