The default SSH port is 22. If you wish to change the SSH port for your Linux server to for example 30200 you can do this the following way:

Connect to your server with the default SSH port with the SSH client of your preference.

Edit the configuration file with for example nano or vi

root@worldstream:~$ sudo vi /etc/ssh/sshd_config

search for “Port”

# What ports, IPs and protocols we listen for
Port 22

In this case we want to change the port to port 30200

Change the number to 30200,

# What ports, IPs and protocols we listen for
Port 30200

Exit the text editor and restart the service.

Restart the SSH service on Debian based systems:

root@worldstream:~$ sudo service ssh restart

Restart the SSH service on Red-hat based systems:

root@worldstream:~$ sudo service sshd restart

You are now able to connect to your server with port 30200

If you have any questions about changing your SSH port feel free to email support here

Learn more about our services: worldstream.com