Blog What Is SSH? How Do You Change the SSH Port? Why Does It Matter?

What Is SSH? How Do You Change the SSH Port? Why Does It Matter?

SSH, short for Secure Shell, is a remote server connection protocol. With the SSH protocol, you can change your server settings and define new configurations. If you are not familiar with SSH commands, it is best to verify any command you plan to use from multiple sources to minimize unwanted results on your server.

We recommend using PuTTY, one of the most widely used programs in this area. Using the most common tool means you are more likely to find solutions from a wider range of sources whenever you run into a problem.

What Is the SSH Port?

It is the access point that allows you to connect to your server via SSH. To change this port, first log in via SSH and then run:

nano /etc/ssh/sshd_config

After opening the SSH configuration file with this command, you can replace the value in the following line with the port you want:

#Port 22

After saving the file, do not forget to run:

service sshd restart

Why Is Changing the SSH Port Important?

The SSH port is often set to 22. Since many servers use this port by default, malicious users may attempt to access your system through it. When you change your SSH port, you reduce the visibility of that default entry point and make such attempts more difficult for third parties.

02-04-2026