Table of Contents
In this short tutorial you will learn how to change your SSH port from the default 22 to another port. This is a recommended step during any initial server hardening. Cloudfanatic’s Debian 10 and 11 operating systems do not come with a firewall by default so the process is very straight forward.
Changing the SSH Port: #
Edit your ssh configuration file:
- Find line: #Port 22
- Uncomment the line
- Change 22 to your desired port number
- Save the file
- Restart SSH service
systemctl restart ssh
That should be all. Try and ssh into your server on your new port.