Last update at :2024-06-21,Edit by888u
Generally speaking, debian system VPS or independent servers use 22 as the port for logging in to SSH by default. Due to weak passwords, some weirdos who like to scan ports may take advantage of it, and resources will be consumed even if they cannot log in. , so how to avoid such a situation? We can directly modify the SSH default login port 22 and change it to something else.
Modification method:
Enter the command: nano /etc/ssh/sshd_config
Just change the default Port 22 to the specified port. For example, change the port to 32873
Port 32873
Then ctrl +x to exit and save; when prompted whether to save, enter y and press enter to confirm.
If you enable the firewall, you also need to modify the port in the firewall rules...
Finally restart the SSHD service:
systemctl restart sshd
Recommended site searches: German servers, how to buy virtual hosts, mainland China registration-free servers, Hong Kong high-defense server rentals, US virtual hosts, Google permanently free servers, telecom IP address query, website registration domain name query, US virtual host , Korean virtual host,
发表评论