Support >
  About independent server >
  How does the server change the remote connection port?
How does the server change the remote connection port?
Time : 2023-08-23 12:01:25
Edit : Jtti

Changing the server's remote connection port is one way to improve security, as the default port may be at risk from automatic scanning and malicious attacks. Here are the general steps to change the server's remote connection port, using SSH as an example:

1. SSH remote connection port change:

Steps:

Log in to the server: Use the current SSH connection or a physical terminal to access the server.

Open the SSH configuration file: usually located in /etc/ssh/sshd_config.

Find and edit a configuration item: Find and edit a Port configuration item. You can choose a port number that is not used by a common service, such as 2222.

Save the file and exit the editor.

restart the SSH service: Use the command sudo service ssh restart or sudo systemctl restart ssh(depending on your system version).

Make sure firewall rules are up to date: If your server has a firewall, make sure incoming traffic on the new port is allowed.

/uploads/images/202308/23/6745de179f5ab422330f6d396444faf7.jpg

2. Other remote connection mode changes:

For other remote connection methods, such as RDP or VNC, the method of changing the port is similar, but the specific steps may be different. It is usually necessary to find the corresponding option in the configuration file or administrative interface, and then change the port number.

Note:

Before changing the remote connection port, make sure you understand how to use the new port to connect to the server, so as not to lock yourself out.

After you change the port, remember to add the new port number to the firewall rules to allow the corresponding inbound traffic.

Do not use common port numbers (such as 22, 3389, etc.), as these ports may be automatically scanned and attacked.

After changing the port, be sure to test the new remote connection configuration to make sure everything works.

Changing the server's remote connection port is one step to improve security, but it still needs to be combined with other security measures such as strong passwords, firewall rules, and timely system updates to protect the server from malicious attacks.

JTTI-Defl
JTTI-COCO
JTTI-Selina
JTTI-Ellis
JTTI-Eom