Error when allocating PTY

Dan Yefimov dan at lightwave.net.ru
Wed Jun 8 22:32:16 EST 2005


On Wed, 8 Jun 2005, Martin Kiepfer wrote:

> hi everybody,
> 
> I'm working on an boot image and actually try to get an ssh server working on clients, booting that 
> image over the net. I want to authenticate with my public key on the client, which seems to work fine.
> The only problem I have is that the sshd couldn't open an console. I've allready tested some things,
> but didn't fix it, yet. in den dev directory all tty's and pty's () exists but I suppose my problem
> has somethinkg to do with a missing kernel configuration.
> Here is the corresponding debug output of sshd:
> 
> debug1: channel 0: new [server-session]
> debug1: session_new: init
> debug1: session_new: session 0
> debug1: session_open: channel 0
> debug1: session_open: session 0: link with channel 0
> debug1: server_input_channel_open: confirm session
> debug1: server_input_channel_req: channel 0 request pty-req reply 0
> debug1: session_by_channel: session 0 channel 0
> debug1: session_input_channel_req: session 0 req pty-req
> debug1: Allocating pty.
> debug1: Received SIGCHLD.
> openpty: Exec format error
> session_pty_req: session 0 alloc failed
> debug1: server_input_channel_req: channel 0 request shell reply 0
> debug1: session_by_channel: session 0 channel 0
> debug1: session_input_channel_req: session 0 req shell
> debug1: Received SIGCHLD.
> 
> Perhaps some of you can give me a hint or even had the same problem and can tell me how to fix it. Am I right that "openpty" is a syscall? I've taken a look into the System.map from my kernel
> but didn't find it.
> 
The matter is that openpty is not a syscall but is a library function. Your
LIBC needs to exec some SUID helper to do chown/chmod on a pty, but it didn't 
find it. You can find that helper under /usr/libexec directory or, in some 
systems, under /lib directory, and you should copy that helper to the same
place in your boot image in order to fix your problem.
-- 

    Sincerely Your, Dan.




More information about the openssh-unix-dev mailing list