1820260 Members
3011 Online
109622 Solutions
New Discussion юеВ

SSH pty allocation error

 
William Allen
Occasional Advisor

SSH pty allocation error

We are running hpux 11.11. We have installed A.04.40.006 HP-UX Secure Shell.

We can get a secure X session but receive the following when attempting to use Putty:

sshd[231]: error: openpty: Bad file number
sshd[231]: error: session_pty_req: session 0 alloc failed

Anybody have any ideas?
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: SSH pty allocation error

What are the kernel parameters npty and nstrpty set to? How many people are logged in? It is possible that you are running out of pty's.

You may need to increse the value of npty and nstrpty, regen the kernel and reboot.
William Allen
Occasional Advisor

Re: SSH pty allocation error

npty 80 - 80
nstrpty 60 - 60

We currently only have about four users accessing the system so I don't think we are running out of sessions.
William Allen
Occasional Advisor

Re: SSH pty allocation error

Found another thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=994275

But this doesn't appear to be the problem:

npty 80 - 80
# ps -ef | grep pty | wc -l
2
# ls /dev/pts | egrep -i '^[0-9]' | wc -w
60
# ps -ef | grep pts | wc -l
1
# fuser -u /dev/ptmx
/dev/ptmx:
Sandman!
Honored Contributor

Re: SSH pty allocation error

You might be out of swap space per this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=985446

~hope it helps
William Allen
Occasional Advisor

Re: SSH pty allocation error

# swapinfo -mat
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
dev 8192 0 8192 0% 0 - 0 /dev/vg00/swap2vol
reserve - 6108 -6108
memory 11625 3423 8202 29%
total 23913 9531 14382 40% - 0 -

Don't think that's the problem either.
Sandman!
Honored Contributor

Re: SSH pty allocation error

Enable loging within Putty and then try connecting via ssh. Look at the system log also for any ssh-related error messages.