OpenSSH_4.3p2 fails to create a pty session

Darren Tucker dtucker at zip.com.au
Wed Aug 16 21:10:35 EST 2006


Eric Millbrandt wrote:
> I am out of ideas about what the problem is.  I am using the default 
> sshd_config installed by the port.  I can authenticate, copy files, and 
> start processes, but sshd fails to create a tty session.  This happens 
> from remote machines and creating a session from the host machine.  I 
> find the following under messages.
> 
> Aug  8 19:32:16 mongoloid sshd[44626]: fatal: mm_send_fd: sendmsg(4): 
> Bad file descriptor
> Aug  8 19:32:16 mongoloid sshd[44626]: error: close(s->ptymaster/0): Bad 
> file descriptor

This appears to be a problem with the descriptors returned by openpty() 
or (less likely) a problem with descriptor passing.  (2.0 vintage 
Linuxes had at least one problem with descriptor passing but I see 
that's not what you have).

> # uname -a
> FreeBSD mongoloid.xxxxxxxxx.com 4.11-STABLE FreeBSD 4.11-STABLE #9: Thu 

In order to figure out what's going on, we need to know what options are 
enabled on your config.h that affect pty allocation.

 From our survey data I see that FreeBSD 4 has openpty (which is used if 
possible) so HAVE_OPENPTY should be set.  (Could you please check 
config.h and confirm, if not post your config.h here.)

Also, you could try this patch to see what descriptors openpty returns. 
  I suspect that one or both descriptors will be -1 but openpty will 
have returned 0 (ie success).

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: openssh-openpty.patch
Url: http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20060816/ba4f8b46/attachment.ksh 


More information about the openssh-unix-dev mailing list