How to change ssh port on centos or ubuntu

From your shell window open file path like below with your favorite text editor :

vim /etc/ssh/sshd_config

Now change port as you want like below

port 2225

Save the file & exit.

Now restart the ssh service with this command :

systemctl restart sshd

Now you can login to your server with non default ssh port.

Thank you for reading this article.

Was this helpful?

1 / 0

Leave a Reply 14

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


oveyocisumia

oveyocisumia

Ahh! so nice

ikisuca

ikisuca

I appreciate it

izbuxeb

izbuxeb

All is well,

osuposopukuav

osuposopukuav

Ohh! working

iveimpe

iveimpe

Well done!

azapegazulki

azapegazulki

Thanks!

uyovajobo

uyovajobo

Simply wish to say your article is as amazing.

oqizabohi

oqizabohi

The clarity for your publish is just spectacular and that i can think you are an expert in this subject.

ihberinonuveb

ihberinonuveb

Your article is amazing I can think you are an expert in this subject.

oleweemeenid

oleweemeenid

Simply wish to say you are an expert in this subject.

ozujixa

ozujixa

Amazing article! The clarity of your publish
is just awesome.

enusozix

enusozix

Simply awesome!

iyufaubujdoc

iyufaubujdoc

Many many thanks bro!

ecotatuy

ecotatuy

It was so clear to understand! thanks.