Changing the SSH port on your server isn’t a complicated process. Nevertheless, we suggest following the step-by-step guide outlined below, to ensure that the change is completed successfully.
- Login to your VPS or Dedicated Server via SSH
- Next, navigate to the following directory:
- Now, you’ll need to edit the following configuration file, by doing:
# vi sshd_config
- Within the configuration file, locate a line that says:
- Make the appropriate change (ports between 1024 and 65535)
- Ensure that you save the changes, and exit
- Upon exiting, please run the following command:
# /etc/init.d/sshd restart
The aforementioned process has now changed the SSH port on your VPS or dedicated server. Next time you connect via SSH, please use the new port number.
If you have any further questions pertaining to your cPanel/WHM VPS hosting or dedicated server, please feel free to get in contact with your web hosting support team for additional assistance.