Operating System - HP-UX
1820592 Members
1749 Online
109626 Solutions
New Discussion юеВ

Server refused to allocate pty

 
JessieG
Occasional Advisor

Server refused to allocate pty

Can anyone help? I'm trying to login using "putty" though ssh but I got the above error?
8 REPLIES 8
Joseph Loo
Honored Contributor

Re: Server refused to allocate pty

hi jessie,

wat is the max. no. of pts devices:

# kmtune -q nstrpty

also the number of pts devices available:
# ls /dev/pts | egrep -i '^[0-9]' | wc -w


regards.
what you do not see does not mean you should not believe
Sameer_Nirmal
Honored Contributor

Re: Server refused to allocate pty

Hi,

Check the kernel parameter "npty" using
# kmtune -q npty

Check the current useage of the ptys being used
# ps -ef | grep pty | wc -l

If the usuage is less than "npty" kernel value , then creat ptys using
# insf -d pty -n
This will creat devices files( ptys ).

If the useage is more that "npty" , the you need to increase the kernel parameter. It will require kernel rebuild and reboot.
JessieG
Occasional Advisor

Re: Server refused to allocate pty

Please see the output below. I still have enough no. of pts devices available. Any ideas?

#kmtune -q npty
npty 60 - 60

#ps -ef | grep pty | wc -l
2

#ls /dev/pts | egrep -i '^[0-9]' | wc -w
60

Sameer_Nirmal
Honored Contributor

Re: Server refused to allocate pty

Hi again,

I over-looked the subject error message, Sorry....

SSH uses stream based pseudo terminal named as "pts" and not "pty". Hence the number of "pts" device files in "/dev" and "nstrpty" kernel parameter are relevant for SSH.
Since you see the "pts" device files are 60, maybe "nstrpty" would be same number. Better check it using kmtune.
Check of "pts" in used using "ps -ef".
If less create the device files using
# insf -d pts -n

Which version of SSH installed on the server?
Where do you see this message?
Any error in syslog,demsg?
Check if "sshd" daemon is running
Is the system is Trusted system?

JessieG
Occasional Advisor

Re: Server refused to allocate pty

Hi please see answers below. Current nstrpty value is also 60

Which version of SSH installed on the server?
A.03.10.002 HP-UX Secure Shell

Where do you see this message? During login, after entering the username and password, I got the following display plus garbage characters.

Server refused to allocate pty
ttytype: couldn't open /dev/tty for reading

Any error in syslog,demsg? I got lots of error like :

error: /dev/ptmx: Device busy
error: session_pty_req: session 0 alloc failed

Check if "sshd" daemon is running
Yup, it is running

Is the system is Trusted system? No

Here's the output of :

#ps -ef | grep pts | wc -l
125
Joseph Loo
Honored Contributor

Re: Server refused to allocate pty

hi jessie,

after looking at your latest reply, it seems a restart of ssh is required.

most importantly, use the latest version of secure shell:

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA

v3.10 is really old.

regards.
(p.s. please assign points.)
what you do not see does not mean you should not believe
Arunvijai_4
Honored Contributor

Re: Server refused to allocate pty

Hello Jessie,

Secure shell version A.03.10.002 is very old and the latest is A.04.20.004. You can download it from, http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Sameer_Nirmal
Honored Contributor

Re: Server refused to allocate pty

Hi,

"error: /dev/ptmx: Device busy" is a real problem. The error you are getting makes a sense for this problem.

The "/dev/ptmx" is a Master pty driver . This device driver should get accessed so that alongwith slave device driver "/dev/pts/" , it will allow the terminal connection.
Check who is using the "/dev/ptmx" device using
# fuser -u /dev/ptmx
You need to kill those processes using
# fsusr -ku /dev/ptmx

Then you should able to log-in.

As mentioned by others, it is always better to have latest version as it contains many fixes for issues encountered in the old versions and new features as well.