Secure Shell (SSH) is a widely used protocol for securely accessing remote servers or computers over the internet. By default, SSH uses port 22 to establish connections, which makes it a popular target for attackers looking to exploit vulnerabilities and gain unauthorized access. To mitigate this risk, server administrators can change the default SSH port to a non-standard port number.
In this blog, we’ll walk you through the steps to reset the default SSH port on cPanel servers.
Step 1: Log in to your cPanel account
Log in to your cPanel account using your username and password. If you’re not sure how to access cPanel, contact your hosting provider for assistance.
Step 2: Navigate to the Terminal option
Once you’re logged in to cPanel, scroll down to the “Advanced” section and click on the “Terminal” option.
Step 3: Open the SSH configuration file
In the Terminal window, type the following command and hit enter:
bash
Copy code
sudo nano /etc/ssh/sshd_config
This will open the SSH configuration file in the Nano text editor.
Step 4: Change the default SSH port
In the SSH configuration file, locate the line that says:
python
Copy code
#Port 22
Remove the “#” symbol at the beginning of the line and change the port number to your desired port number. For example, if you want to use port 2222, the line should now look like:
yaml
Copy code
Port 2222
Step 5: Save and exit the SSH configuration file
Once you’ve made the necessary changes to the SSH configuration file, save the file by pressing “Ctrl + X”, then “Y”, and finally “Enter”.
Step 6: Restart the SSH service
In the Terminal window, type the following command and hit enter to restart the SSH service:
Copy code
sudo service sshd restart
Step 7: Verify the new SSH port
To verify that the SSH port has been changed successfully, log out of cPanel and open a new terminal window. Then, connect to your server using the new SSH port number:
java
Copy code
ssh [email protected] -p 2222
Replace “username” with your cPanel username and “yourserver.com” with your server’s hostname or IP address.
If the connection is successful, you have successfully reset the default SSH port on your cPanel server.
How to Reset Default SSH Port On CPanel Servers beneficial for companies?
Resetting the default SSH port on cPanel servers can be beneficial for companies in a few ways:
- Improved Security: The default SSH port (22) is commonly targeted by hackers for brute-force attacks. Changing the default port to a different, random number can make it more difficult for attackers to find and exploit the SSH service on the server. This can help to enhance the overall security of the server and reduce the risk of unauthorized access.
- Reduced Server Load: By changing the default SSH port, companies can reduce the amount of traffic hitting their servers, as automated scans for open ports will not be able to find the new port number. This can help to reduce the server load and improve its performance.
- Compliance with Regulations: In some industries, compliance regulations require companies to take steps to secure their servers and protect sensitive data. Changing the default SSH port can be seen as a best practice for server security, and can help to meet these compliance requirements.
- Customization: By changing the default SSH port, companies can customize their server settings to fit their specific needs. This can help to make the server more secure and efficient, and can help to support the specific requirements of the business.
Overall, resetting the default SSH port on cPanel servers can be a simple and effective way to improve server security, reduce server load, and customize the server to meet the specific needs of the business.
Conclusion
In conclusion, changing the default SSH port is a simple and effective way to improve the security of your cPanel server. By following the steps outlined in this blog, you can quickly reset the default SSH port to a non-standard port number and reduce the risk of unauthorized access. InstaCarma provides server management and outsourced web hosting technical support services. The company is focused heavily on the web hosting industry.