I need restrict session limit on my OpenSSH server only for one session (one connection). I use Ubuntu Desktop 7.10. Of course Version is old, but I need it for experimental purposes. I tried modify my config file - /etc/ssh/sshd_config two ways:First I changed:MaxStartups 1 but it does not work correctly. I can make many connections still.Second I changed:MaxSessions 1 after restart I get error message: /etc/ssh/sshd_config: line 71: Bad configuration option: MaxSessions/etc/ssh/sshd_config: terminating, 1 bad configuration optionsI saw to sshd_config MaxSessions parameter and I tried add:mato - maxlogins 1 to /etc/security/limits.conf but it does not help me.I used - http://www.cyberciti.biz/faq/iptables-connection-limits-howto/ too:/sbin/iptables -A INPUT -p tcp --syn --dport 22 -m connlimit --connlimit-above 1 -j REJECT, but I get error message:iptables: No chain/target/match by that name
Session limit for OpenSSH server on Ubuntu Desktop 7.10
linux;ubuntu;ssh;iptables;openssh
http://www.openssh.com/txt/release-5.1The MaxSessions option was implemented on the version 5.1 of OpenSSH. Ubuntu 7.10 uses the version 4.6 so, this option will not be available to you. http://www.ubuntu.com/usn/usn-612-2/Possible solutions:Download a newer version of OpenSSH and comple itMake a apt-pinning and install a newer version of itWhat about if you put the following option on your limits.conf?user hard    maxlogins       1Since your ar using a pretty old piece of software, a lot of OpenSSH options and iptables modules could not be available to help you on this task