If you are connected to Linux via SSH and you want to bump up number of max file open either for DB2 or for your any program, you might run into issues where it does not work for you.

Say for example:

You login as root and do this modification to /etc/security/limits.conf

# ulimit -n

# cat /etc/security/limits.conf
db2inst1        soft    nofile          4096
db2inst1        hard    nofile          9000

After you make above change and logout and login back again as db2inst1 and you run ulimit -n and you still get it as 1024.

Why did the above change did not work? It has to do something with SSH configuration and without worrying too much about it, do this change in your sshd.config file.

# cat /etc/ssh/sshd_config | grep UsePrivilegeSeparation
#UsePrivilegeSeparation Yes

If you see above line as commented, uncomment it and make it as NO.

# cat /etc/ssh/sshd_config | grep UsePrivilegeSeparation
UsePrivilegeSeparation No

After this, restart your sshd

# service sshd restart

Logout and login back as db2inst1 and run ulimit -n and you should see the updated value.

I did not investigate what security implications this might have but my task to see how I get it working. If you are inside your company network, you should not worry about it. I will worry if my server is exposed to internet.