FW: ulimits in ssh/sshd without resorting to PAM?

Hebenstreit, Michael michael.hebenstreit at intel.com
Tue Aug 7 01:38:27 EST 2012


The problem is in a an HPC cluster - under normal circumstances lower limits are enforced, but some jobs need higher limits. We do not want to allow higher limits by default, except when explicitly requested by the users (because as default setting they are to high; a job not aware of correct limits might overload/crash the system). 

Thanks for the answers; looks like my current method to set the limits in a start script and restart sshd is not so bad after all (even if it's clunky)

Happy hacking
Michael

-----Original Message-----
From: dtucker at dtucker.net [mailto:dtucker at dtucker.net] On Behalf Of Darren Tucker
Sent: Sunday, August 05, 2012 6:09 PM
To: Damien Miller
Cc: Hebenstreit, Michael; openssh-unix-dev at mindrot.org
Subject: Re: FW: ulimits in ssh/sshd without resorting to PAM?

On Mon, Aug 6, 2012 at 8:56 AM, Damien Miller <djm at mindrot.org> wrote:
> On Thu, 2 Aug 2012, Hebenstreit, Michael wrote:
>
>> Is there an (even rudimentary) way to compile/configure/use ulimits 
>> in ssh/sshd without resorting to PAM?
>>
>> I've searched docs and archives, but did not find anything
>
> You might have to use a custom login shell.

If you just want to reduce them from whatever the system defaults are you could just put the appropriate ulimit commands in the shell's startup (probably /etc/profile).

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.


More information about the openssh-unix-dev mailing list