How to increase the number of allowed telnet sessions

From Wiki-UX.info
Jump to: navigation, search

Abstract

The number of simultaneus telnet, ssh or rlogin sessions that can be opened concurrently in a system is limited by the number of pseudo teletype and stream base teletype device special files. The number of these devices are caped by the nstrtel, nstrpty, npty kernel parameters. This article explains how to increase this kernel parameters according to your system needs.

Procedure

1. Check the current number of device special files.

# ls /dev/pts/t* | wc -w
60

2. Check and modify the require kernel parameters.

HP-UX 11i v1 (11.11):

# kmtune -q nstrtel -q nstrpty -q npty
Parameter             Current Dyn Planned                    Module     Version
===============================================================================
nstrtel                    60  -  60
nstrpty                    60  -  60
npty                       60  -  60
# kmtune -s nstrtel=100 -s nstrpty=100 -s npty=100

Rebuild the kernel using SAM or manually from the command line. Reboot the system.

HP-UX 11i v1 / v2 (11.23 / 11.31):

# kctune nstrtel nstrpty npty
Tunable  Value  Expression
npty        60  Default
nstrpty     60  60
nstrtel     60  Default
# kctune nstrtel=100 nstrpty=100 npty=100

Rebuild kernel using KCWEB or manually from the command line. Reboot the system.

3. Create the required number of device special files according to the new kernel parameters.

# insf -d tels -s 100

4. Check the current number of device special files.

# ls /dev/pts/t* | wc -w
100

Reference

Authors