change sshd port

How to change ssh port in linux ?

How to change ssh port in linux ?
I suggest to change the port for security reason. Because every second there are a lot of bruteforcer keep brute force our sshd port, the original port is 22. If you change to another port, then they may skip you and go find for another victim or maybe they need time to find the port.

login as root

# vi /etc/ssh/sshd_config

The original is

[adrotate banner=”1″]
# Port 22
change sshd port
Change to any port that is not using by other services, example
Port 1337

Then write and quit
:wq
[adrotate banner=”2″]
Restart the SSHD service
# server sshd restart

How to change the default port for ssh ?
How To Change Default SSH Port in Ubuntu?
Change ssh port in Linux ?
Change ssh port in CentOS ?

Tags:

2 thoughts on “How to change ssh port in linux ?”

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.