Linux VPS Security Settings One modification SSH port (Centos/debian) _linux

Source: Internet
Author: User
Tags vps ssh port
Old left in a number of previous articles have been shared in CentOS or in the Debian environment to install LNMP and LLSMP tutorials, the old left with the personality guarantee is certainly feasible, because I was in the actual operation after the screenshot and write down the article. Can let the VPS beginners hands-on learning how to install the system on the Linux VPS and set up a website. Old left for the first time using a VPS will not install the environment, ready to ask a user to install, but also prepared to charge 50 yuan, in view of this I will self-study.

We have learned the VPS installation and build the station, it is definitely necessary to learn the VPS security settings. Because the VPS and host are different, the host may give us backup, and the host security has the host to undertake. However, if we are using a VPS, that VPS security host is not responsible, since we choose to use VPS, we must do a good job of security maintenance. The next few articles old left will share several more basic Linux VPS security settings. Share the modified SSH port today.

Regardless of our site is not well-known, many hackers or peers are using software directly scan the site vps/host port, the General people know that the VPS port is 22, if we modified the port at least first find the port, many times because our port is the default, Even host security can leave a large number of log files. These files are bad records that are cracked by profiteering.

How to modify the SSH port: Log on to SSH and then open the file via the Vi/etc/ssh/sshd_config command to modify the number behind the port. (vi's basic application should be?) : Wq is to save the meaning of the exit, A is the meaning of the editor, ESC is to quit the current meaning)



The final step is to restart SSH, it is important to note that CentOS and Debian are different commands, which is also a lot of novice webmaster in playing VPS when the question arises. So I'll talk about both of these methods.

 code as follows:

CentOS Restart Ssh:service sshd restart
Debian reboot Ssh:service ssh restart


Whether to change the good, we use putty login ssh to try. The old left test was modified successfully.
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.