Changing the SSH Port for Your Linux Servers

Published on May 8th, 2018 by

Considering security measures, it is possible to change the default SSH Port for the Linux server. I this small tutorial we will be explaining how to change the SSH Port for the Linux servers like Debian, Ubuntu and others.

Change SSH Port

WARNING: Make sure the new SSH Port does not conflict with any known or blocked ports like 80, 443.

How to Change the SSH Port in Linux Servers?

Follow the steps one by one…

1. Connect to the server via SSH by root user.

2. Open SSHD_CONFIG for modification by following command.

nano /etc/ssh/sshd_config

3. Locate #Port 22.

4. Remove # and change the 22 with desired one.

5. Save edits and Restart SSHD by following command.

service sshd restart

Now we have successfully changed the SSH Port for our Linux server.

All we need to just login with new port, like – ssh user@ip -p port.

Published in Science and Technology

About AtulHost

Hi, I'm Atul Kumar Pandey; also known as AtulHost on the web, a blogger by profession with an objective of sharing fresh and real contents in the business and technical topics; from contents to useful resources it's all here.

Leave a Reply

Your email address will not be published. Required fields are marked *