For changing SSH port on a Linux based device, please Follow these steps:
1- Login as root or a user on the sudouser list
2- By nano or vi, locate and open the file sshd configuration (usually in nano /etc/ssh/sshd config).
3-Look for the line that begins with "#Port 22."
4- Remove the hashtag (comment marker) and replace the number with any port you like, for example 6044.
5- Exit the file editor after saving your changes.
6- By issuing "service sshd restart", restart the SSH service.Your device's SSH port has been changed successfully!