Small measures to improve Linux Server Security

Source: Internet
Author: User

Hackers are often physically active.
With scanners hanging, you can search for undefended hosts, implant backdoors, control them, and sell them to people you need.
Therefore, some basic security measures can avoid being too easy to target. The following is a brief introduction.
Disable remote root login
Root, the default system management account, is the most vulnerable target. It is absolutely necessary to disable ssh remote logon.
Method:
Edit/etc/ssh/sshd_config
1
PermitRootLogin no
Create a personal account for the administrator and assign it to the sudoers user group (% admin by default)
$ Sudo adduser example_user
$ Sudo usermod-a-G admin example_user
Modify SSHD default port
The default port 22 of the remote service SSHD is also the focus of port scanning. modifying it to another port (usually over 1024) can avoid most attacks.
Method: www.2cto.com
Edit/etc/ssh/sshd_config
1
Port 8822 # default 22
 
Use SCP instead of FTP
Although FTP is convenient, its security has been criticized.
In background file management, encrypted SCP can better solve this problem.
SCP uses the SSHD service, so you do not need to configure it on the server. You can directly adjust the account permissions.
In Windows, you can use the software winscp to connect to the server.
Http://winscp.net
 
Install denyhosts
Denyhost can automatically analyze security logs to prevent brute force cracking on suspicious hosts.
Debian users can directly use apt for installation.
1
$ Sudo apt-get install denyhosts
Http://denyhosts.sourceforge.net/
 
Exercise caution in controlling directory and file permissions and use user groups flexibly
For example, if the monitoring program munin needs to access website logs, do not modify the log file permission settings, but add munin to the www-data user group.
1
$ Sudo usermod-a-G www-data munin
 
Use a dedicated account for the System Program
Try to use a dedicated account for each system program to avoid using root
For example, mysql and munin. Use commands such as sudo-u example_user to switch between the execution user and user group.
 
Download putty from official website
Putty is a very popular remote tool on windows, but it is not easy to download.
Download this important and free software from the official website and perform integrity verification.
Official Website: http://www.chiark.greenend.org.uk /~ Sgtatham/putty/
 
Postscript
We hope this will help improve the security of your website.

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.