HostOnNet Blog

How to change default SSH port 22

You can change the default SSH port 22 of your server in order to make people difficult to access your server.

Once you are logged in to the server as root we can begin editing the sshd_config file.

1. Open /etc/ssh/sshd_config file

2. Look for line Port 22 and change the new port number.

ssh port

3. Restart sshd server.

service sshd restart

About Annie

I've been working in Technical Section for over 10 years in a wide range of tech jobs from Tech Support to Software Testing. I started writing blog for my future reference and useful for all.