Change SSH PORT(DevOps)

Safaetul Ahasan
Oct 23, 2023

By default, loggging to the server via SSH is done on the port 22. Knowing that, attackers scan the port 22. Changing the port to a different one makes the attacker’s job more difficult. To do that:

vi /etc/ssh/sshd_config

Change:

port SSH 22

with a new port (let’s say 1234), write the new port down somewhere Close the file and:

service sshd restart

--

--