OpenSSH and stdin/stdout assigning

Darren Tucker dtucker at dtucker.net
Fri Oct 9 13:17:18 AEDT 2015


On Oct 9, 2015 11:29 AM, "Павел Сафронов" <pv.safronov at gmail.com> wrote:
>
> Hey, guys, I have a question about a difference between openssh 4.3 and
5.3.
> I have plenty of servers with RHEL5 and RHEL6.
> Most of RHEL5 servers have openssh-server version 4.3p2-72.el5_6.3
> (kernel 2.6.39-100.7.1uek)
> And RHEL6 servers have 5.3p1-111.el6 (kernel 3.8.13-35.el6uek.x86_64)
>
> So there is the difference in assigning stdin and stdout for ssh
> connections. Openssh 4.3 assigns socket (I assume this socket points
> to /dev/log

No, sshd calls socketpair(2).

> I'm wondering is it expected behaviour?

Yes, in that we changed the compile time default at some point between
those two because pipes have better close semantics for what sshd wants to
do.

> Is there way to assign pipes in openssh 4.3 too?

Recompile it with -DUSE_PIPES.

> Looked through code but I'm not very familiar with C programming.
>
> PS Some daemon libs think that if stdin is socket then daemon is
> running from inetd and it is causing some trouble.

That sounds a bit silly.  Which daemons?


More information about the openssh-unix-dev mailing list