OpenSSH_4.3p2 fails to create a pty session

Eric Millbrandt emillbrandt at coldhaus.com
Fri Aug 18 07:32:22 EST 2006


Darren Tucker wrote:
>> debug3: mm_request_send entering: type 26
>> mm_send_fd: sendmsg(4): Bad file descriptor
>>     
>
> I'm not sure if the "Bad descriptor" error refers to the descriptor
> being sent or the descriptor over which it is sent.  I suspect the former
> otherwise sshd would have bailed much sooner.
>   
OK, so here is what sshd is using.

openpty returned 0 descriptors 4/6 name /dev/ttyp3
debug3: mm_request_send entering: type 26
lsof me now! (pid 48051, sock 5, fd 4)

COMMAND   PID USER   FD   TYPE             DEVICE SIZE/OFF   NODE NAME
sshd    48051 root  cwd   VDIR              131,0      512      2 /
sshd    48051 root  rtd   VDIR              131,0      512      2 /
sshd    48051 root  txt   VREG              131,4   466520 178162 
/usr/sbin/sshd
sshd    48051 root  txt   VREG              131,4   134952  67061 
/usr/libexec/ld-elf.so.1
sshd    48051 root  txt   VREG              131,4    43456 725219 
/usr/lib/libwrap.so.3
sshd    48051 root  txt   VREG              131,4    59472 725201 
/usr/lib/libpam.so.1
sshd    48051 root  txt   VREG              131,4    51464 725414 
/usr/lib/libutil.so.3
sshd    48051 root  txt   VREG              131,4    75952 725227 
/usr/lib/libz.so.2
sshd    48051 root  txt   VREG              131,4    43752 725368 
/usr/lib/libcrypt.so.2
sshd    48051 root  txt   VREG              131,4   227961 594503 
/usr/local/lib/libk5crypto.so.3
sshd    48051 root  txt   VREG              131,4  1897548 594240 
/usr/local/lib/libcrypto.so.3
sshd    48051 root  txt   VREG              131,4   287598 594516 
/usr/local/lib/libgssapi_krb5.so.2
sshd    48051 root  txt   VREG              131,4   792821 594505 
/usr/local/lib/libkrb5.so.3
sshd    48051 root  txt   VREG              131,4    31078 594497 
/usr/local/lib/libcom_err.so.3
sshd    48051 root  txt   VREG              131,4   892448 725721 
/usr/lib/libc.so.4
sshd    48051 root  txt   VREG              131,4    47438 594495 
/usr/local/lib/libkrb5support.so.0
sshd    48051 root  txt   VREG              131,4     7088 725189 
/usr/lib/pam_skey.so
sshd    48051 root  txt   VREG              131,4    34464 725408 
/usr/lib/libskey.so.2
sshd    48051 root  txt   VREG              131,4    63880 725388 
/usr/lib/libmd.so.2
sshd    48051 root  txt   VREG              131,4     8184 725190 
/usr/lib/pam_opie.so
sshd    48051 root  txt   VREG              131,4    49256 725183 
/usr/lib/libopie.so.2
sshd    48051 root  txt   VREG              131,4     8080 725198 
/usr/lib/pam_unix.so
sshd    48051 root  txt   VREG              131,4     5792 725194 
/usr/lib/pam_permit.so
sshd    48051 root    1u  VCHR                2,2      0t0    149 /dev/null
sshd    48051 root    2u  VCHR                5,2 0t274816    726 / 
(/dev/mlxd0a) (like character special /dev/ttyp2)
sshd    48051 root    3u  IPv4 0xfffffe00140bb420      0t0    TCP 
mongoloid:ssh->mongoloid:3713 (ESTABLISHED)
sshd    48051 root    4u  VCHR                6,3      0t0    729 /dev/ptyp3
sshd    48051 root    5u  unix 0xfffffe0013b8df80      0t0        
->0xfffffe0013b91100
sshd    48051 root    6u  VCHR                5,3      0t0    728 /dev/ttyp3

Looks ok to me.  Am I missing something?
> The other thing to check is to make sure all of your device files for
> ptys exist (maybe rerun MAKEDEV or whatever FreeBSD uses).
>   
The device files look ok, or at least telnet doesn't mind using them.  I 
reran MAKEDEV anyways for luck.  Still no luck though.
crw--w----  1 emillbrandt  tty    5,   3 Aug 17 16:51 ttyp3
crw-rw-rw-  1 root  wheel    6,   3 Aug 17 16:51 ptyp3




More information about the openssh-unix-dev mailing list