Change SSH Port
First, Open SSH Configuration File (sshd) :
sudo nano /etc/ssh/sshd_configFind the line that reads #Port 22. Next, eplace it with New Port :

To:

Second, Save File Modification Press Ctrl + O and Enter After Press Ctrl + X
Next, restart the SSH service using the following command:
Debian and Ubuntu:
sudo service ssh restartDebian and Ubuntu with systemd:
sudo systemctl restart sshCentOS and Fedora
sudo service sshd restartCentOS and Fedora with systems:
sudo systemctl restart sshd