Ulimit in ssh session

Hello,

I changed my ulimits for message queues by editing the ‘/etc/security/limits.conf’ to

*    hard    msgqueue    unlimited
*    soft    msgqueue    unlimited

When I login per COM port I get the expected output for ‘ulimit -q’ as ‘unlimited’ for root and for a normal user.

But when I connect per ssh, my settings of limits.conf aren’t recognized and I get ‘819200’ for ‘ulimit -q’ for root and user logins.

I checked ‘/etc/pam.d/su’ and ‘/etc/pam.d/login’ and in both files the entry

session    required    pam_limits.so

is present.

What did I miss? Do I have to modify ‘/etc/pam.d/dropbear’?

Best regards,
Markus

Hello @Mowlwurf ,

Could you try setting the UsePrivilegeSeparation no in /etc/ssh/sshd_config?
It could also be that upon login it was reset from etc/security/limits.d/90-nproc.conf for all non-root users. That also helps sometimes.

Hope one of the solutions works.

Best Regards,
Janani

Hi Janani,

thanks for your response. Unfortunately none of your files mentioned are present on my system.

I used the tdx-reference-minimal-image recipe as the basis for my own image. Therefore dropbear is used as ssh server.

Hello @Mowlwurf ,

I don’t have much experience with Dropbear as a SSH server. I could ask my colleagues about this and meanwhile here is something I found:

Best Regards,
Janani