• 1-888-289-2246
  • 24x7x365 Presence

Enabling custom ports for access to the Linux server via SSH


Making SSH (secure shell) access to the server easily available is not a good idea. For this, we should turn firewall access to the server off on the default port 22 and provide access only to a known IP address. However, this is not always possible.
One other way to secure access to the server is to change the default SSH port from 22 to something else. To do this we can follow the steps below:-

Step 1: Login onto the Linux server.
Step 2: Go to file /etc/sshd/sshd_config and find the line as => #Port 22
Step 3: Remove the command from the start and make it as => Port 23456 .
Step 4: After this restart the SSH service and log out from the server. Now check for SSH access on port 22 and you won’t be able to do so.
Step 5: Then try to do SSH access on the server on port 23456 and login onto the server.

That’s all to be able to secure SSH access to the server on a default port.

]]>


Leave a Reply

Your email address will not be published. Required fields are marked *