Limit Eterm telnet Connections

There are a number of ways to limit the number of simultaneous telnet connections.

This guide is for informational purposes only. The implementation and support of any such limitation is the responsibility of the customer. Eclipse does not implement or provide technical support for such configurations.

Login Script (AIX and Linux)

To limit the number of simultaneous logins for a specific user account, a script can be placed in the user’s login script (i.e. .profile). Here’s an example script:

ME=`who am i | awk '{print $1}'`
case $ME in
	eclipse )
		LOGLMT=10
		;; # Login limit
	* )
		LOGLMT=1
		;; # Login limit
esac
LOGCNT=`who | awk '{print $1}' | grep "^$ME$"| wc -l  | awk '{print $1}'`
if [ $LOGCNT -gt $LOGLMT ] ; then
	print "You are logged in $LOGCNT time(s)."
	print "You are limited to $LOGLMT login(s)."
	print "Please finish current task and try again."
	print "Logging off..."
	sleep 5
	logout
fi

Telnet Service Limiting (Linux)

By default, RHEL limits the number of telnet connections from a single host to 10 simultaneous sessions. To lower the limit:

  • Open the /etc/xinetd.conf file for editing
vim /etc/xinetd.conf
  • Find the line containing the “per_source” value
  • Decrease the integer from 10 to an appropriately-sized value for your environment
  • Save the configuration file
  • Reload xinetd
service xinetd reload