SSH is the best service to control dedicated servers as it provides the full control to perform any task. So it’s one of the commonly used way to attack a server. Changing the default SSH port can help secure your server from launching brute force attacks to the default port.
If the firewall is active then we need to add a rule to allow connections for our new SSH port.
This can be done by executing ‘ufw allow newportnumberhere/tcp‘