Server refused to allocate pty Warning: no access to tty (Bad file number)

Check out this article about Server refused to allocate pty Warning: no access to tty (Bad file number). Please tell me what you think about it. You can contact me anytime!

(Also for Solaris PTY. Setting up number of PTYs)

That error was experienced when trying to connect to a server through ssh. The server being accessed here is a Sunfire V20 running Solaris 2.6.

First glance, looks like that the maximum number of allowed ssh connection has been reached. This is a knows issue for old version of Solaris but not in 5.8 and newer. Solaris kernel tuning is required.

All jobs/services were transferred from one box to another. From the old server, there was no reported login problem (“Server refused to allocation pty”) ever.

Setup maxuser on Solaris 2.6

To change the default value of ‘maxuser’ on a Solaris 2.6, we need to edit /etc/system and add the required value.

The default value is set to either the number of MB of physical memory or MAX_DEFAULT_MAXUSERS, whichever is lower.

For Solaris 2.5.1-7, MAX_DEFAULT_MAXUSERS is 1024. For Solaris 8-10, MAX_DEFAULT_MAXUSERS is 2048.

maxusers can be set explicitly in the /etc/system file, but is limited to 2x MAX_DEFAULT_MAXUSERS.

After editing the /etc/system file, the box need to be restarted.

More information can be seen here and here.