Blocking linux backdoors-ssh is a dangerous factor

Source: Internet
Author: User

Many Webmasters have linux Hosts, whether they are virtual machines or physical machines. Generally, we use ssh (SecureShell is based on the security protocol at the application layer and Transport Layer) for remote connection ).
Its default port is 22, and root is used by default. This is a very dangerous thing on the Internet. We can only disable root logon by changing its default port (although it will still be detected by port scanning) to improve security.
1.Modify the default ssh port
A. Temporary modification of the command line
In Linux, the default SSH port is 22. For security reasons, modify the SSH port to 1433 as follows:
/Usr/sbin/sshd-p 1433
 
B. modify the configuration file permanently.
Vi/etc/ssh/sshd_config
Then, change the value to port 8888.
 
2.Service sshd restart (redhat as3) as root)
3.Use putty and port 8888 for remote connection.
 
 
To enhance security
 
First, add a user with normal permissions:
 
# Useradd sshuser
 
# Passwd sshuser
 
// Set the password. It must be a complex password. Use the notebook to write it down so that you do not forget it.
 
The production machine prohibits ROOT remote SSH login:
 
# Vi/etc/ssh/sshd_config
Set
 
PermitRootLogin yes
 
Change
 
PermitRootLogin no
 
Restart sshd service
 
# Service sshd restart
 
 
Remote Management: Use sshuser as the common user to log on, and then use su root to switch to the root user to obtain the highest permission.
 

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.