Basic Ports in Linux
If you check the file /etc/services, you will see the common ports and their usage. The ports defined in /etc/services in the default. to change the Port assign for the SSH (secure shall), locate and edit the file /etc/ssh/sshd_config. You can comment out the current default Port number which is 22 via pound sign ( # ). ex.: # Port 22 Edit the entry to use a different port, making sure to select an unused port number, such as Port 2224 save your changes, and then restart the sshd server. Remote users must now access the host through port 2224, which can be done using ssh's -p (port) option like so: $ ssh -p 2224 remote_host_name_or_IP |

