How to solve the problem that Linux does not limit the Limit value after opening SSH

  

When we use the Linux operating system, we always open the SSH service, but sometimes we will find that the limit value is not limited after logging in to SSH. How to solve this problem? Today, Xiaobian will take a look at the solution to this problem with everyone, I hope to help everyone.

Solution:

Check the limits under the relevant circumstances of the process generating applications and found that the modified value. (cat /proc/pid/limits)

I used su - user and found that the value of ulimit -a shows success again

What is the problem?

After ssh login is not successful, then I wonder if the pam module has been modified? View /etc/pam.d/login /etc/pam.d/sshd contains pam_limits.so

So is it sshd without using the pam module?

Look at the configuration file

grep -i pam /etc/ssh/sshd_config

Note. Suddenly remembered that the ssh version of the server has been upgraded. Pam should not be enabled, and the parameter --with-pam needs to be added when compiling and installing. The rpm package is open.

This is the solution to the limit value is not limited after the SSH service is enabled. If you have any problems with this problem, check these files just like Xiaobian, so that you can find out the cause of the problem.

Copyright © Windows knowledge All Rights Reserved