Thanks for checking reborg. I do have an extra line in the /etc/pam.d/sshd file "auth optional pam_lockout.so minuid=100". I doubt that it has anything to do with the limits.conf file though.
An update...
I found that connecting by telnet sets the value to 4000 as set in /etc/security/limits.conf, but using ssh still keeps the old (default) value of 1024. A colleague suggested that this has something to do with the UsePrivilegeSeparation directive in sshd_config.
However this directive was originally not present in my sshd_config file (I don't know the default value), and I tried setting it to both yes and no (restarting sshd each time, ofcourse), but it made no difference.
Again, if anyone has any further suggestions, it would help.
Reborg, if you could tell me what the UsePrivilegeSeparation is set to on your SuSE box, it would help too.
Fixed the problem! A close look at the sshd_config file showed that Use_PAM wasn't set at all. Set that to yes. Also set ChallengeResponseAuthentication to no.
UsePAM yes
ChallengeResponseAuthentication no
After this a restart of sshd is all that it takes to fix it.