How to change the SSH port
Introduction
One of the most common server administration tasks is to change your server's SSH port. While this is often seen as good practice, beginners need to understand that this configuration change doesn't increase your server's security whatsoever. The port can still be discovered using a port scanner. The only thing you'll achieve in terms of security is that you'll reduce the amount of standardized brute force attacks or network scans and thus decluttering your authentication log.
We have an extensive SSH security tutorial available where we cover extended topics of SSH security, and we highly recommend you following along.
This tutorial requires you to know how to edit a file. If you're unfamiliar with this, please read our tutorial on how to edit a file in Linux, first.