Linux logon limits users and IP addresses

Source: Internet
Author: User
Linux logon limits users and IP addresses-Linux Enterprise applications-Linux server applications. The following is a detailed description. 1. Restrict IP login:

1: hosts. allow in the/etc/directory is the IP configuration file that can be logged on. If the currently available IP address range is 192.168.0.0

It can be set:

Sshd: 192.168.0.0/255.255.255.0)

2: hosts. deny under the/etc/directory is the restricted IP configuration file, set to all cannot log on

Sshd: all

The two configuration files are finally configured to log on to the system through SSH only the IP address in the 192.168.0.0 network segment!

Ii. restrict user login:

1. Modify/etc/pam. d/sshd.

Auth required pam_listfile.so item = user sense = allow file =/etc/sshusers onerr = fail

2. Add users

Echo "root">/etc/sshusers
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.