SSH by default utilizes port 22 on most linux machines. Why should changing the port matter? Changing the ssh port adds another layer of protection to your server. In conducting a risk assessment, the highest chance of your machine being compromised is if it has it's own dedicated ipv4 address on the internet. Why? It is due to malicious actors possessing scripts that have the ability to detect if port 22 is open; which further entices them to conduct brute force and dictionary attacks against your machine. Keep in mind that changing your port does not provide the ultimate protection, but another form of defense to making your server an open and vulnerable target.
Type the following command:
(or whatever port of your choice). Keep in mind to utilize a port under 1024 (for security reasons).
Once complete, press
To login to your box, type the following
ssh -p 799 mydomain.com
ssh -p 799 192.168.1.5
Obviously, change the port accordingly to what you select and the ipaddress/domain of your box! If all works, you will get the ssh prompt to login!