Linux VPS Host to modify the VPS default SSH port method

Source: Internet
Author: User
Tags ssh centos vps ssh port

If we start to modify the default port, even if we need to guess and crack the password, we need to find the port, at least to increase the difficulty of the VPS intrusion, in this article, the old Chiang will share how to modify the VPS default SSH port.

The first step, vi/etc/ssh/sshd_config

Using Xshell or Putty login VPS, the default VPS is typically 22 ports, and then enter Vi/etc/ssh/sshd_config will see such an interface.

All we need to do is change the 22 number to any 5 digits (this is a bit more appropriate).

Step two, reboot SSH

After we have modified and exited the above, we need to reboot SSH before it can take effect.

#centos
/etc/init.d/sshd restart
#debian或者ubuntu
/etc/init.d/ssh restart

If we are using a CentOS system or a debian/ubuntu, reboot ssh with a different command.

In this way, after the reboot, the default port changes, we can use the new port login ssh, or SFTP, so that security is much better than the default

Friendly tip: If we modify the SSH port remember to need to add your port in the Iptalbes firewall, otherwise you cannot log in.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.