Bug 20625

Summary: sshd can't allocate pty
Product: Base System Reporter: dirk.meyer <dirk.meyer>
Component: binAssignee: Kris Kennaway <kris>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-STABLE   
Hardware: Any   
OS: Any   

Description dirk.meyer 2000-08-15 22:30:01 UTC
	If number of used ptys < 16 all is okay.
	If number of used ptys > 17 sshd can't allocate ptys
	xterm (X-Free86-3.3.6) still can ...
	files in /dev/ seems to exist and working.

server:
 sshd[488]: error: openpty: No such file or directory
 sshd[488]: error: Failed to allocate pty.
 sshd[538]: error: openpty: No such file or directory
 sshd[538]: error: Failed to allocate pty.

client:
 Warning: Remote host failed or refused to allocate a pseudo tty.
 Warning: no access to tty (Bad file descriptor).
 Warning: Remote host failed or refused to allocate a pseudo tty.
 Warning: no access to tty (Bad file descriptor).

Fix: 

none ...
How-To-Repeat: 
	open more than 16 xterms,
	then try to login via ssh.
Comment 1 paul 2000-08-15 22:41:28 UTC
cd /dev
sh MAKEDEV pty1 pty2

paul

dirk.meyer@dinoex.sub.org (dirk.meyer@dinoex.sub.org) wrote:
> 
> >Number:         20625
> >Category:       bin
> >Synopsis:       sshd can't allocate pty
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       medium
> >Responsible:    freebsd-bugs
> >State:          open
> >Quarter:        
> >Keywords:       
> >Date-Required:
> >Class:          sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Tue Aug 15 14:30:01 PDT 2000
> >Closed-Date:
> >Last-Modified:
> >Originator:     Dirk Meyer
> >Release:        FreeBSD 4.1-STABLE i386
> >Organization:
> privat
> >Environment:
> 
> 	FreeBSD 3.4-STABLE i386
> 	FreeBSD 4.0-STABLE i386
> 	FreeBSD 4.1-STABLE i386
> 
> >Description:
> 
> 	If number of used ptys < 16 all is okay.
> 	If number of used ptys > 17 sshd can't allocate ptys
> 	xterm (X-Free86-3.3.6) still can ...
> 	files in /dev/ seems to exist and working.
> 
> server:
>  sshd[488]: error: openpty: No such file or directory
>  sshd[488]: error: Failed to allocate pty.
>  sshd[538]: error: openpty: No such file or directory
>  sshd[538]: error: Failed to allocate pty.
> 
> client:
>  Warning: Remote host failed or refused to allocate a pseudo tty.
>  Warning: no access to tty (Bad file descriptor).
>  Warning: Remote host failed or refused to allocate a pseudo tty.
>  Warning: no access to tty (Bad file descriptor).
> 
> >How-To-Repeat:
> 
> 	open more than 16 xterms,
> 	then try to login via ssh.
> 
> >Fix:
> 	
> 	none ...
> 
> 
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-bugs" in the body of the message

-- 
Paul Saab
Technical Yahoo
paul@mu.org - ps@yahoo-inc.com - ps@freebsd.org
Do You .. uhh .. Yahoo!?
Comment 2 dirk.meyer 2000-08-16 03:31:36 UTC
Paul Saab wrote:,

> cd /dev
> sh MAKEDEV pty1 pty2

the device files already exist,
otherwise xterm cant use it either.

crw-rw-rw-  1 root  wheel    6,   0 Aug 15 23:09 ptyp0
[...]
crw-rw-rw-  1 root  wheel    6,  31 Aug 15 09:15 ptypv
[...]
crw-rw-rw-  1 root  wheel    6,  64 Aug 15 19:02 ptyr0
[...]
crw-rw-rw-  1 root  wheel    6,  95 Jun 23 07:53 ptyrv
[...]
crw--w----  1 dm    tty      5,  31 Aug 15 23:09 ttypv
[...]
crw--w----  1 dm    tty      5,  64 Aug 15 23:09 ttyr0
[...]
crw-rw-rw-  1 root  wheel    5,  95 Jun 23 07:53 ttyrv

> > 	If number of used ptys < 16 all is okay.
> > 	If number of used ptys > 17 sshd can't allocate ptys
> > 	xterm (X-Free86-3.3.6) still can ...
> > 	files in /dev/ seems to exist and working.

Gruß Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Tel 05606/6512 Q (voice)
- Origin: DINOEX Habichtswald  -FRG-  [dirk.meyer@dinoex.sub.org]
Comment 3 dirk.meyer 2000-08-16 07:27:57 UTC
> > cd /dev
> > sh MAKEDEV pty1 pty2
> 
> the device files already exist,
> otherwise xterm cant use it either.
> 
> > > 	If number of used ptys < 16 all is okay.
> > > 	If number of used ptys > 17 sshd can't allocate ptys
> > > 	xterm (X-Free86-3.3.6) still can ...
> > > 	files in /dev/ seems to exist and working.

You could close the pr,
as the problem is related to the MAKDEV indeed.
The still working xterm was misleading me,
as it connected to /dev/ttyr?.
/dev/ttyq? was indeed missing, 
despite I called MAKEDEV that way.
openpty breaks by the fist missing file.

kind regards Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
Comment 4 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-16 08:48:30 UTC
Responsible Changed
From-To: freebsd-bugs->kris

Over to the maintainer.
Comment 5 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-16 09:26:25 UTC
State Changed
From-To: open->closed

Closed on request.