ssh is the common way to log in to linux server, but for security reasons, sometimes we need to do some special processing for ssh, this article records some modifications I have made for everyone. reference.
First, modify the ssh port
ssh defaults to 22 ports, if you need to modify to other ports, you can modify the /etc/ssh/sshd_config file,
#Port 22
The comment is removed, modified to the required port (such as 8888), and then use the following command to restart the ssh service
service sshd restart
Second, turn off the root user remote ssh login Permissions
If you do not want the root user to log in remotely, you can modify it as follows:
vi /etc/ssh/sshd_config
Will
#PermitRootLogin yes
The comment is removed, yes to no, restart ssh service (here best reboot)
Third, prohibit certain users from remote login
1. Modify /etc /pam.d/sshd
Add a line after #%PAM-1.0:
auth required pam_listfile.so item=user sense=allow file=/etc/ssh_users onerr=fail
2. Enable user remote login (for example, allow abc remote login):
echo abc /etc/ssh_users
3. User remote login:
rm –rf /etc/ssh_users
The above example simply deletes the file. In fact, if a user is not allowed to log in, the user is deleted from the ssh_users file. can.
LDM/STM instructions are mainly used for field protection, data copying, parameter transfer, etc. ST
1. /The root partition is a mandatory partition, partitioned according to your actual situation. 2.
This article introduces the concept, role, and usage of LVM to help you understand LVM and to use LV
view mysql default encoding format show variables like “character%”; If the reality-bash
Shell script recursive function - traverse each directory to operate
How to check the current version of the network card under the Linux operating system
Modify Linux MAC address in VMware virtual machine
The best solution for hard disk partitioning under Linux
Linux device driver development environment build
Linux high-end: ReiserFS file system data recovery software
Configuration Notes on Strengthening Linux Operating System Security
Win10 App Store: Allows Business Users to Create Their Own Private Areas
How to set the computer lp address
How to improve the speed of Google Chrome running under Linux?
Can win10 system logs be deleted? What is the role of the win10 system logs folder?
Winxp forced free upgrade after the official version of win10 how to activate?
How to install win7 and win8 dual system u speed installation win7 and win8 dual system tutorial
Operating system security features are still not deep enough.
Tencent computer butler upgrade Win10 method Windows10 upgrade assistant fool tutorial