Focus on cloud service provider activities
Notes on website operation and maintenance

One of the Linux VPS security settings: Modify the SSH port (CentOS/Debian)

Lao Zuo has shared the tutorial of installing lnmp and llsmp in Centos or Debian environment in many previous articles. It must be feasible for Lao Zuo to use personality assurance, because I took screenshots and wrote articles after actual operations. VPS beginners can learn how to Linux VPS Install system and set up website on. Lao Zuo will not install the environment when he uses VPS for the first time. He is going to ask a netizen to install it. He is also going to charge 50 yuan. In view of this, I will teach myself.

Recommended reading:
Linux VPS Installation LNMP System Environment Tutorial
LLsMP: Debian Installation LLsMP Environment Tutorial

After learning how to install and build VPS, we must learn VPS security settings. Because VPS is different from the host computer, the host computer manufacturer may back it up for us, and the security of the host computer is borne by the host computer manufacturer. However, if we are using VPS now, the security of VPS is not borne by the host company. Since we choose to use VPS, we must do a good job of security maintenance. In the next few articles, Lao Zuo will share some basic Linux VPS security set up. Share first today Modify SSH Port

No matter whether our website is famous or not, many hackers or peers use software to directly scan the VPS/host port of the website. Generally, everyone knows that the VPS port is 22. If we modify the port, at least we cannot find the port first. Many times, because our port is the default, even the host security will leave a large number of log files. These files are wrong records cracked by profiteering.

Modify SSH Port Method: Log in to SSH, and then vi /etc/ssh/sshd_config Command to open the file and modify the number after port. (The basic application of vi should be able to?: wq means to save and exit, a means to edit, and esc means to exit)

 One of the Linux VPS security settings: Modify the SSH port

The last step is to restart ssh. It should be noted that centos and debian are different commands, which is also a question many novice webmasters have when playing VPS. So I'll talk about both methods.

CentOS Restart SSH: service sshd restart

DeBian restarts SSH: service ssh restart

Whether to change it, let's try to login SSH with PUTTY. The old left test was modified successfully.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » One of the Linux VPS security settings: Modify the SSH port (CentOS/Debian)


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge