SSH client, dup, pty.

Damien Miller djm at mindrot.org
Tue Apr 30 11:23:29 EST 2002


On Mon, 29 Apr 2002, Allan McIntosh wrote:

> Hey,
> 
> 	I am hoping that some one on this list may be able to help me.
> 
> I started investigate the possibility of forking a process, the child then 
> attach to a pty, dup std[in|out] to the pty, then exec the ssh client.
> 
> For some reason, the ssh client still prompted straight to stdin and 
> stdout rather than through the pty that I created. 

You probably haven't set the controlling terminal, have a look at 
Stevens _Advanced Programming in the Unix Environment_ or 
sshpty.c:pty_make_controlling_tty() for how to do this across common 
platforms.

-d




More information about the openssh-unix-dev mailing list