A guide for modifying the default SSH port on Vultr Compute instances to improve security against automated attacks
Changing the default SSH port (22) enhances security by reducing automated attacks. Follow the steps below to safely change the SSH port on your Vultr Compute instance:
SSH into your Vultr instance.
Open the SSH daemon config file.
Locate the following line:
Uncomment it and replace 22 with your desired port number (e.g., 2222):
Use a port between 1024 and 60000 to avoid conflicts.
Allow the new port in the firewall.
Restart the SSH service to apply the changes.
To SSH into your instance now you have to define the port as well.
Once verified, you can optionally remove access to port 22:
The above steps are demonstrated on an Ubuntu instance. If you're using a different Linux distribution (like CentOS, AlmaLinux, or FreeBSD), refer to your system's specific documentation.
0 Comments
Be the first to comment and share your perspective with the community.