ServerCake India

How to Change the SSH Port Number?

Change SSH port Number
SSH Port Graphical Illustration

What is SSH Port Number?

The default SSH port number can be changed to a port number between 1024 and 32,767. Secure Socket Shell(SSH) is a Unix based command Interface and protocol for securely getting access to a remote computer. SSH commands are encrypted and secured in several ways.

How to change the SSH Port Number?

The default port number of SSH can be changed for security purpose. The following steps are done to change the SSH port number.

1.Log into the server via SSH as a root user.

2.Run the command vi/etc/ssh/sshd_config

3.Locate the line # Port 22

4.Remove # and change the default port number 22 to desired port number between 1024 and 32,767.

5.Then restart the sshd service by running the command service sshd restart

Editorial Team

Editorial Team at ServerCake India Blog is a team of experts in Server Administration, Business Development, Management, SEO Analyst & Graphic Designers with more than 5+ years of expertise.

Add comment