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


# Port 22

Change to any port that is not using by other services, example
Port 1337

Then write and quit
:wq


Restart the SSHD service
# server sshd restart

?
How To Change Default SSH Port in Ubuntu?
Change ssh port in Linux ?
Change ssh port in CentOS ?

Some people are looking for:

  • how to change ssh port in linux
  • centos 5 6 change ssh port
  • check ssh port
  • how check ssh port
  • how to change port in ssh linux
Tags: , , , , , , , , ,

2 Responses to How to change ssh port in linux ?

  1. HumptyDumpty says:

    Is the ssh file name distro-dependent? Mine’s missing the d.

  2. juzhax says:

    /etc/ssh/sshd_config

Optimized by SEO Ultimate