Changing the SSH Port for Your Linux Server

Changing the SSH Port for Your Linux Server

You can change the default SSH port for your Linux server as an added security measure

NOTE! Make sure the new SSH port does not conflict with any known or blocked ports, and it is enable in your firewall !

To Change the SSH Port for Your Linux Server:


Step 1

Connect to your server via SSH

Step 2

Open /etc/ssh/sshd_config with your favorite text editor

Step 3

Locate the following line:

# Port 22

Step 4

Remove # and change 22 to your desired port number and save the file. Please use port numbers higher then 1024

Port 31337

Step 5

Restart your SSH server

service sshd restart
sudo reload ssh

About the Author
Web Guy
We have a burning desire to assist as many people as possible obtain a digital presence. We have and will keep striving to provide our clients with enterprise-level performance at an unbeatable cost. We are proud to offer a wide range of customized, hybrid, virtual private server (VPS) hosting and web development services. All our clients enjoy a 99.9% uptime SLA and 24/7 rapid response support team. We have a core directive to always provide our clients with the best services and infrastructure possible, no matter if you’re hosting a game server, a high-intensity database, a development environment, or anything in-between. Contact Us for more details.

Leave a Reply