How Can you Change the SSH port.html

March 6, 2023 /

In this article, We will explain what SSH is and how to modify the SSH port.html

Secure Shell or socket Shell (SSH) is a network protocol for assigning users to certain system administrators. It allows secure access to a website or an unprotected network.

It also refers to a collection of tools that implement the SSH protocol. Strong password authentication and public key authentication are both available with SSH. The data is secure, as is the communication between the two computers.

Now the steps for to change the SSH port.html

1. You must allow traffic to the new SSH port through any firewall that is currently blocking traffic to the server.

2. To connect to the server, you must use the current SSH port (default 22) It’s important to maintain SSH connected until you’re sure you’ll be able to use SSH on the new port number.

3. Now set the port line in /etc/ssh/sshd_config.If this line does not already exist, you can add it;

Lines that have been commented on will begin with a # character, which can be removed to make them uncommented. The Port line will look something like this, with 1234 replaced by the port number you want to use.

Port 1234

4. It’s time to restart SSHD.

/scripts/restartsrv_sshd

5. Once the new port is there, you need to test the SSH. On Linux, here’s an example of how to set port 1234 via SSH.

ssh USER@HOSTNAME -p1234

6. If the SSH test on the new port passes, you can close the connection used to change the port and make any further changes you desire, including closing the old SSH port. If it fails, you’ll need to use the currently active SSH connection to troubleshoot. This SSH connection should be retained until the SSH test on the new port passes.

We hope that you now have a good understanding of Changing the SSH port.html. If you continue to have problems with the protocol outlined above, please contact the bodHOST Team for constructive assistance 24×7.

Read Also: How To Generate A New Key SSH Access

Leave a Reply

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