How to change SSH Port

Linux server normally or default use 22 port for SSH access. SSH is one of the most popular communication protocols on the Internet. It's widely used by developers, webmasters, and sysadmins. It allows you to gain remote access to your new Cloud or Dedicated box in just seconds using an encrypted communication channel. 

 

Today I will show how to change ssh port of linux server or cPanel server. SSH comes listening on port 22, which is widely known among attackers and security tools/port scanners that launch brute force attacks against it. While this is considered security by obscurity, it helps to eliminate lots of noise on port 22.

 

Login your SSH using your server password 

 

Run this command : nano -w /etc/ssh/sshd_config 

Search: Port 

You will see that 22 port is there just replace it 

For example 1255 

Then save it and exit.

Then run this command: service sshd restart  

or 

systemctl restart sshd

This is one of the oldest and most popular ways to obscure the SSH service.